Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6212

how to loop through a nested dictionary or json data in Reactjs

$
0
0

Using Reactjs how do you create a function component that loop through the json data below and display location content.

I want the function to also be able to display something else like members if needed.

I am new to react and most examples online show it using class component (which i am not interested into)

data.json

[{"squadName": "Super hero squad","homeTown": "Metro City","formed": 2016,"secretBase": "Super tower","active": true,"members": [    {"name": "Molecule Man","age": 29,"secretIdentity": "Dan Jukes","powers": ["Radiation resistance","Turning tiny","Radiation blast"      ]    },    {"authorization": "Black card","location": ["Next","Previous","Here"      ]    }  ]}]

Viewing all articles
Browse latest Browse all 6212

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>