Deep nested array of objects not displaying

I have a fairly nested array that is formed from retrieving data from Firebase, modifying it and passing it as a property. Array structure enter image description here

Each array (2) has values ​​in almost the same format. I am trying to do two months = 1, mild = 3, etc. Datapoints from each array (2) '[0] object, as well as datapoints from array (2)' 1 , for example RWJ = 2.5, (object 0 directly above it is the exact data format). I tried to first display the "RWJ" key using the following enter image description here

When I try to accomplish this, it does nothing. However, when I call a simple function that writes "thirdData" to the console, it displays exactly what I am looking for.

enter image description here enter image description here

thirdData = (value) => {
  console.log(value)
}

, , . , Firebase, , , .

+4
1

, innermost.

return Object.keys(secondData).map((thirdData, i) => {
     return <div key={i}>
           {this.thirdData(thirdData)}
     </div>
}

P.S. ,

() => {} () => (...), , , (...), , , return the content

return Object.keys(secondData).map((thirdData, i) => (
     return <div key={i}>
           {this.thirdData(thirdData)}
     </div>
)
+4

Source: https://habr.com/ru/post/1681325/


All Articles