title: JavaScript loop through JSON array?
body: <p>I am trying to loop through the following json array:</p>
  <pre><code>{
    &quot;id&quot;: &quot;1&quot;,
    &quot;msg&quot;: &quot;hi&quot;,
    &quot;tid&quot;: &quot;2013-05-05 23:35&quot;,
    &quot;fromWho&quot;: &quot;hello1@email.se&quot;
  }, {
    &quot;id&quot;: &quot;2&quot;,
    &quot;msg&quot;: &quot;there&quot;,
    &quot;tid&quot;: &quot;2013-05-05 23:45&quot;,
    &quot;fromWho&quot;: &quot;hello2@email.se&quot;
  }
  </code></pre>
  <p>And have tried the following</p>
  <pre><code>for (var key in data) {
     if (data.hasOwnProperty(key)) {
        console.log(data[key].id);
     }
  }
  </code></pre>
  <p>But for some reason I'm only getting the first part, id 1 values.</p>
  <p>Any ideas?</p>