I am having a hard time trying to get my data from this array. Can someone please tell me how to do this?
I need to get the latLng and AdminArea4 from within the locations for an autocomplete.
Can someone please explain the difference between the {} and []. From what I know, one is an array and the other an object but I am not sure if this is right. Is the process different from traversing an array than an object?
{
"results": [
{
"locations": [
{
"latLng": {
"lng": 24.873108,
"lat": 59.389755
},
"adminArea4": "Harju maakond",
"adminArea5Type": "City",
"adminArea4Type": "County",
"adminArea5": "Rae vald",
"street": "",
"adminArea1": "EE",
"adminArea3": "",
"type": "s",
"displayLatLng": {
"lng": 24.873108,
"lat": 59.389755
},
"linkId": 0,
"postalCode": "",
"sideOfStreet": "N",
"dragPoint": false,
"adminArea1Type": "Country",
"geocodeQuality": "CITY",
"geocodeQualityCode": "A5XXX",
"adminArea3Type": "State"
},
{
"latLng": {
"lng": 24.860184,
"lat": 59.38493
},
"adminArea4": "Harju maakond",
"adminArea5Type": "City",
"adminArea4Type": "County",
"adminArea5": "Rae",
"street": "",
"adminArea1": "EE",
"adminArea3": "",
"type": "s",
"displayLatLng": {
"lng": 24.860184,
"lat": 59.38493
},
"linkId": 0,
"postalCode": "",
"sideOfStreet": "N",
"dragPoint": false,
"adminArea1Type": "Country",
"geocodeQuality": "CITY",
"geocodeQualityCode": "A5XXX",
"adminArea3Type": "State"
},
]
}
]
}