title: Looping through json parse loops through each character
body: <p>I am trying to loop through a JSON string that I have gotten from PHP, the problem I am having is that when I try to loop through my string, it doesn't loop through each object instead it loops through each character in the string.</p>
  
  <p>I thought the solution to this would be to parse it but no success.</p>
  
  <pre><code>var json = JSON.stringify(player.get(url));
  console.log(json);
  json = $.parseJSON(json);
  
  for (var key in json) {
      if (json.hasOwnProperty(key)) {
          console.log(key + " -&gt; " + json[key]);
      }
  }
  </code></pre>
  
  <p>I am getting a perfectly good JSON result, because I have tested it in an online converter -</p>
  
  <pre><code>{
      "id": "1",
      "username": "Jessica",
      "password": "password",
      "age": "100",
      "size": "100"
  }
  </code></pre>
  
  <p>However through when I loop through it, the console displays this:</p>
  
  <p>0 -> { index.html:29</p>
  
  <p>1 -> " index.html:29</p>
  
  <p>2 -> 0 index.html:29</p>
  
  <p>3 -> " index.html:29</p>
  
  <p>4 -> : index.html:29</p>
  
  <p>5 -> " index.html:29</p>
  
  <p>6 -> 1 index.html:29</p>
  
  <p>7 -> " index.html:29</p>
  
  <p>8 -> , index.html:29</p>
  
  <p>9 -> " index.html:29</p>
  
  <p>10 -> c index.html:29</p>
  
  <p>11 -> h index.html:29</p>
  
  <p>12 -> a index.html:29</p>
  
  <p>13 -> r </p>
  
  <p>Any ideas to why it's not looping through the json object properly?</p>