I'm aware that the getJSON AJAX request is supposed to return an array of strings (and is automatically parsed for my use).
Not entirely. jQuery.getJSON()
will parse a JSON response into the equivalent JavaScript instances and values. But, what those values are depends entirely on the response.
I wasn't aware that there's a 'results' property on a Javascript array?
In this case, since the request is to Parse, their basic query responses follow the format you're finding (amended with comments):
The result value is a JSON object that contains a
results
field with a JSON array that lists the objects.{ // root object "results": [ // array of results { // individual result object // ... }, { // another result object // ... } ] }
In the callback, dataReceived
will be equal to the "root" Object
defined by parsing such JSON data.