I am getting a response from an endpoint which is this:
[[{"1":"91"}],[{"1":"1"}],[{"1":"0"}],[{"1":"0"}],[{"1":"0"}],[{"1":"0"}],[{"1":"0"}],[{"1":"0"}]]
I fetched them and I get the results but I cannot render them. This is what I have been trying:
render() {
const {count} = this.state;
return (
<div>
{count.count && count.count.map(item => (
item.value.map(data => (
data.value.map(x => (
<p>{x.value}</p>
))
))
))}
</div>
)
}
I expect the out to be all the numbers shown in the json response. Ex. 91 1 0 0 0 etc.
this.state.countmapwhile you have 2 levels in the object. Also, wherevalueprop came from? In the object, there is notvalue. And you're expect the result to contains94..but you have no94in the object. Where thecountcome from? etc.