When I use console.log(responseJSON), it prints the following JSON format logs on the screen. However, I am specifically interested in printing only the latlng values. When I attempt to access the latlng data with console.log(responseJSON.markers.latlng) or console.log(responseJSON.markers), it returns undefined.
Array [
Object {
"markers": Object {
"index": "1",
"latlng": Object {
"latitude": "40.3565",
"longitude": "27.9774",
},
},
},
Object {
"markers": Object {
"index": "3",
"latlng": Object {
"latitude": "40.3471",
"longitude": "27.9598",
},
},
},
Object {
"markers": Object {
"index": "2",
"latlng": Object {
"latitude": "40",
"longitude": "27.9708",
},
},
},]
I am seeking guidance on how to correctly print and retrieve specific data, like so:
console.log(responseJSON.markers.latlng);