Answer the question
In order to leave comments, you need to log in
How to make Object.map?
I had an array with data. 7 elements for which I used data.map . I uploaded this array to firebase and now I can't call it like that because it is no longer an array but an object.
Question.
How do I make a data.map for an object. Moreover, I need to transfer the received data from the object: name , info , image , latlng to the component that is inside data.map.
Object example:
Object {
"0": Object {
"id": 0,
"image": "/images/Star.jpg",
"info": "Star is a 1994 science fiction adventure film released through Metro-Goldwyn-Mayer (MGM) and Carolco Pictures..",
"latlng": Object {
"latitude": 53.6937,
"longitude": -336.1968,
},
"name": "Star",
"year": "1994",
},
Answer the question
In order to leave comments, you need to log in
For example Object.keys(this.state.users)
- https://snack.expo.io/B1bErzcwE
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question