title: Does an array returned from an AJAX request from the server (encoded and parsed JSON) have a 'results' property?
body: <p>I have a function that fetches data from a server via an AJAX request. The asynchronous callback takes the data and then displays it to the DOM.</p>
  
  <p>I'm aware that the getJSON AJAX request is supposed to return an array of strings (and is automatically parsed for my use). So I want to take that array of strings and cycle through them using jQuery's $.each method, which takes 2 arguments - the collection and a function that operates on each item in the collection. </p>
  
  <p>Here's the relevant code:</p>
  
  <pre><code>setInterval(function () {
              $.getJSON("https://api.parse.com/1/classes/chats")
              .done(function(dataReceived){  
                  $('.messages li').remove();
                  $.each(dataReceived.results, function (index, value) {
                      $('.messages').append('&lt;li&gt;' + value.text + '&lt;/li&gt;')
                  })    
              });
          }, 2500);
  </code></pre>
  
  <p>My question is with regards to the array that's returned from the getJSON request - in my function it's a parameter named 'dataReceived'...</p>
  
  <p>That's an array of strings that's already been parsed so it's Javascript ready, right? </p>
  
  <p>Also, and <strong>this is the main crux of my question</strong> - I wasn't aware that there's a 'results' property on a Javascript array? Or is it only that the getJSON function returns an object/array that has a results property? I'm a little bit lost here...If anyone could clear that up for me (whether by directly answering or with the appropriate documentation) that would be great. Because the code doesn't work if I just pass 'dataReceived' into the $.each-iterator. It requires the 'results' property (dataReceived.results).</p>