I retrieved the data from the database which was in [object Object].
I usually convert these data using JSON.parse but it did not working so, I tried JSON.stringify but the data now it's like
[{"station" : "NewYork"}, {"station" : "Toronto"}]
Now I don't know how to convert this data into an array object and access it. I need only object entries but I don't know how to access it.
If it is declared to var data I need it like data[0]['station'] to access but I couldn't do it.
data[0]['station']withoutJSON.stringifyorJSON.parse[object object]is default serialization of an object. moreI retrieved the data from the database: How? From an API response? How does your API respose look in browser? It should look something like this.{"message":[{"station_name":"Hebbal"},{"station_name":"Jalahalli"},{"station_name":"Malleshwaram"},{"station_name":"Peenya"},{"station_name":"R.T.Nagar"},{"station_name":"Rajajinagar"}]}@AjeetShah