How to render the JSON file in reactJS

  drop-down-menu, html, javascript, json, reactjs

I have the JSON file like this

[{
  "amenity": ["bar", "restaurant", "college", "library", "school", "university", "atm", "bank", "clinic", "hospital", "pharmacy", "nursing_home", "cinema", "embassy", "fire_station", "police", "post_office", "toilets", ""],
  "Buildings": ["yes", "apartments", "bungalow", "hotel", "house", "residential", "commercial", "supermarket", "school", "religious", "hospital", "government", "college"],
  "highway": ["motorway", "trunk", "primary", "secondary", "tertiary", "unclassified", "residential", "pedestrian", "footway", "path", "bus_stop"]
}]

I need to display this JSON file in the react component. I need to display two select option in the first one I need to select anyone of the 3 key like amenity, buildings, highway in the second one I need to display the corresponding values of array in the second object

Source: Ask Javascript Questions

LEAVE A COMMENT