I have a react JS file and I\'m attempting to bind data to a dropdown list. The data is stored in the following testing API/json file: https://api.myjson.com/bins/okuxu ...I wan
In this.state define the json -
this.state
CityNames : { CityName : [ {CityKey : 1,CityDescription: 'abc'}, {CityKey : 2,CityDescription: 'xyz'} ] }
Here is the code for Drop Down List
---select--- { this.state.CityNames && this.state.CityNames.CityName.map((h, i) => ({h.CityDescription})) }