How do i dynamically display an array that has multiple arrays. The nested arrays have multiple objects.
e.g.
Var obj =
[
[
{
name: "Test 1",
category: "Test 1"
},
{
name: "Test 2",
category: "Test 1"
},
],
[
{
name: "Test 1",
category: "Test 2"
},
{
name: "Test 2",
category: "Test 2"
},
]
]
So how do i dynamically display this and render it in a react component I tried [below] and it works perfect and displays the first array-object, but i cant figure out a way to make it display the rest
list = obj[0].map((e, index) => {
return (
<div key={index}>
<p>{e.name}</p>
<h6>{e.category}</h6>
</div>
)
})
return (
<div>
{list}
</div>
)