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" ] } ]}]