title: JavaScript & jQuery parse JSON in loop
body: <p>Sorry about asking this, I can't get it to work even with looking at other questions...</p>
  
  <p>I have a JSON output in "json.php", for example:</p>
  
  <pre><code>    [
         {"serverid":"1","servername":"Server One"},
         {"serverid":"2","servername":"Server Two"}
      ]
  </code></pre>
  
  <p>I have a script, to grab the data &amp; parse it into a variable</p>
  
  <pre><code>var servers;
  jQuery.get('json.php', function(data) {
       servers =    JSON.parse(data);
       jQuery('#servers').servers.servername
  });
  </code></pre>
  
  <p>I have a div to output the results to:</p>
  
  <pre><code>&lt;div id="servers"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Whatever I try, I always get some kind of</p>
  
  <blockquote>
    <p>"Uncaught TypeError: Cannot read property 'servername' of undefined" error.</p>
  </blockquote>
  
  <p>I'd also like to look around the results, however I can't even get it to print atm.</p>
  
  <p>Again sorry for another question like this</p>