Nested JSON Array column mapping

Nested JSON Array column mapping

ZeussZeuss Posts: 4Questions: 3Answers: 0

I have a datatable which takes ajax data source as nested JSON array. When I map my columns using columns.data option it is printing the array in a single TD as a comma separated list and not in separate TDs. Am I doing something wrong with referrencing the data in JSON?

My JSON is somewhat like this:
[{ "name":"abcd", "address:abcd", "details":[{"xyz":"1234,"abc":"1050","dob":"01/01/1980"},{"xyz":"0000,"abc":"9999"...},{...}] .. ]
and datatable column mapping
"columns": [
{ "data": "details[, ].xyz" },
{ "data": "details[, ].abc" },
{ "data": "details[, ].dob" }
],

Is that the right way of mapping? Cause the data is rendered but like this < TD > 1234,0000,... < TD >.
Any help appreciated.

This discussion has been closed.