I am having trouble maping through an array, i am using Object.entries to map the data, find below the example of the json structure. here is what i have tried but i get errors, i know the bath is not correct.
{
Object.entries(this.props.optionData.steps).map((t, k) => (
<option onClick={(e) => this.optionSelectHandle(t, k)} key={k} value={t[0]}>
{t[1]}
</option>
));
}
{
"steps": [{
"step_num": 1,
"description": "Description"
},
{
"step_num": 2,
"description": "Description",
"uncommon_field": "some data"
}
]
}