I would like to get some clarification on whether or not I can work with a nested JSON dataset in this format with the primereact datatable.
"collections": [
{
"name": "CollectionOne",
"categories": [
{
"code": "001",
"text": "Withdrawl"
},
{
"code": "002",
"text": "Point of sale purchase"
},
{
"code": "003",
"text": "Cardholder credit"
},
{
"code": "004",
"text": "Exchange Fee"
}
],
"mapDefinitions": [
{
"collectionName": "CollectionTwo",
"required": true,
"multiEntry": false,
"alias": null
},
{
"collectionName": "CollectionThree",
"required": true,
"multiEntry": true,
"alias": "Third Collection"
}
]
}
I have read posts saying to flatten out this data and display it that way and others with the angular version saying I can just use map.name to get into the nested object. This doesn't work for me, so what is the best approach to displaying data from multiple layers of nesting in a react datatable?