I can not read data from JSON. I checked that the data is stored in the component state from console after the component get mounted. In the return statement, I tried to render the url string from JSON data using map method. When I log the data information from the console, the data can be found in 'this.state.data' or 'elm' but when add 'multimedia[idx]' to the end of it, it says can not find the data. I want to know the reason of it.
this.state.data.map((elm, idx) =>
//...
<div>{elm.multimedia[idx].url}</div>
//...
JSON data shape of multidmedia element logged from the console:
(29) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, undefined, {…}]
0:{
caption: "string",
copyright: "string",
format: "mediumThreeByTwo210",
height: 140,
subtype: "photo",
type: "image",
url: "https://static01.nyt.com/images/2019/02/05/science/05SCI-ZIMMER1/05SCI-ZIMMER1-mediumThreeByTwo210.jpg",
width: 210
}