title: AJAX JSON response is 'undefined'?
body: <p>I have a JSON output on a remote page that looks like this:</p>
  
  <pre><code>{"success":true,"content":"some texts goes here, blah blah blha"}
  </code></pre>
  
  <p>I need to get the <code>content</code> from the JSON above.</p>
  
  <p>So i did this:</p>
  
  <pre><code>    var poutput = $('.legalP');
  
      $.ajax({
      url: 'http://www.url-to-page.com',
          dataType: 'json',
          timeout: 5000,
          success: function(data){
               $.each(data, function(pi,item){ 
                   var products = ''+item.content+'';
                   alert(products);      
                   console.log(products);
                   poutput.append(products);                
               });
          },
          error: function(){
              //alert('There was an error loading the data.');
          }
  });
  </code></pre>
  
  <p>When i run the code above, I get undefined for the <code>alert(products);</code></p>
  
  <p>Could someone please advise on this?</p>