2
klutch
4y

Ugh, retrieving specific data fields nested within several arrays and objects in Javascript/Json jacks me up every fucking time!!!

Anyone ever fuck with the MapQuest geolocation/geoqueries api??

I'm trying to retrieve the lat/lng values out of responses generated from submitted address strings, and it's nested about 8 json layers deep.

I feel like I'm overthinking this?
I can access the values in my web console, and can reach them after using the console to assign them to a temp var, but can't get to the values from my actual js code. Only when I run some business logic from the console.

Here's a shitty example of me explaining the tree:

[{...}]
0:
locations: Array(3)
0:
latLng:
lat: <data here>
lng: <data here)

Comments
Add Comment