Coding in javascript, and I am trying to put objects into arrays, and the Array looks like
arr = [
{"id":1,"location":"Place1"},
{"id":2,"location":"Place2"}
]
I am trying to do arr[1].location, but arr[1] is undefined and console.log(arr[0]) and arr[1] in inspect element just returns as a "{". Im not sure if this is a chrome thing, but node does seem to accept the format.
Edit: I am collecting from a api that I made and this is the format it returns the code, I am just trying to access variable location. I am asking how would I get said variable
Problem answered in comments, didn't parse data.