-
-
Notifications
You must be signed in to change notification settings - Fork 271
-
I don't see anything in the docs showing how to render nested JSON Data in a CSmartTable. Any suggestions on how to achieve?
I want to display three groups with the last group having three child fields each in their own columns. Here's an example bit of the data:
{ "who": "Dr. Adam Rowe", "when": "2023-08-07 09:46:03 -0700", "what": [ { "key": "animal_name", "from": null, "to": "Dog" }, { "key": "breed", "from": null, "to": "Lab" }, { "key": "end_time", "from": null, "to": "2023-08-07 09:45:00 -0700" }, { "key": "start_time", "from": null, "to": "2023-08-07 09:30:00 -0700" } ] }
Here's my current columns definition:
[ { group: 'Who', key: 'who_group', children: [ { key: 'who', label: '', _style: { width: '20%' } } ] }, { group: 'When', key: 'when_group', children: [ { key: 'when', label: '', _style: { width: '20%' } } ] }, { group: 'What', key: 'what_group', children: [ { key: 'key', label: 'Field' }, { key: 'from', label: 'From' }, { key: 'to', label: 'To' } ] } ]}
Beta Was this translation helpful? Give feedback.