I have data in for of list of lists and I want to render it in the view.
The data:
{
"blocks_content": [
[
" Bakery",
" Company GbR",
],
[
"Bill no.3-7721 11:29:51 20.04.2021"
],
[
"1x Cappuccino 2,70€ 2,70€ A"
],
]
}
I tried like this but I am not seeing any error or warning. what I could be missing?
return (
<Container>
....
{
fileBlocks !== null &&
<Form.Field>
<Label>{fileBlocks["name"]}</Label>
{fileBlocks["blocks_content"].forEach((element, index) => {
<List key={index}>
{
element.forEach((line, i) => {
<List.Item key={i}>
{line}
</List.Item>
})
}
</List>
})}
</Form.Field>
}
...
</Container>
);