Obtaining information from a straightforward API ().
I retrieve the data using getJSON:
var police = $.getJSON(queryurl);
A console.log on police
displays this:
https://i.sstatic.net/Kjyz8.png
However, I am unable to access the properties within the object.
I assumed that I could access it by using, for instance, police.responseJSON
, but this returns as undefined.
I am aware that there are several related questions regarding this issue, but none of the solutions seem to address my particular scenario. For example, I have also attempted police[0].responseJSON
and police['responseJSON']
, but both yield undefined results.