title: How to parse this json with jquery?
body: <p>I'm trying to create my first node.js program with socket.io and I want to store the chat history and then when a user joins have the chat history pushed to his browser. I have the chat saving and pushing and the json that is sent looks like this:</p>
  
  <pre><code>[
      [
          {
              "username": "Warren2",
              "text": "Test"
          },
          {
              "username": "Warren2",
              "text": "Test2"
          },
          {
              "username": "Warren2",
              "text": "Test3"
          }
      ]
  ]
  </code></pre>
  
  <p>On my html page I have a javascript that has this</p>
  
  <pre><code>socket.on('updatehistory', function(data) {
  
  }
  </code></pre>
  
  <p>The code that I put in there will be executed when the updatehistory message is pushed. I'm a n00b and pretty lost lol. This is what I tried:</p>
  
  <pre><code>socket.on('updatehistory', function (data) {
     $.each(json.results, function(username,text){
        $('#conversation').append('&lt;b&gt;'+ username + ':&lt;/b&gt; ' + text + '&lt;br&gt;');
    });
  });
  </code></pre>
  
  <p>This is the exact debug message for the updatehistory event from node.js</p>
  
  <pre><code>debug - websocket writing 5:::{"name":"updatehistory","args":[[{"username":"W
  arren2","text":"Test"},{"username":"Warren2","text":"Test2"},{"username":"Warren
  2","text":"Test3"}]]}
  </code></pre>
  
  <p>Can someone help me figure out how to parse that (preferable with jquery).
  Thank you :D</p>