nested json object custom format using render

nested json object custom format using render

harmeetbawaharmeetbawa Posts: 1Questions: 1Answers: 0

I came across this solution on https://datatables.net/forums/discussion/25947/nested-object-data-arrays-with-dynamic-length where the data of type:

{
"aaData": [
{
"Days": [
{
"FromDay": "2015-02-07",
"ToDay": "2015-02-09"
},
{
"FromDay": "2015-02-10",
"ToDay": "2015-02-12"
}
]
},
{
"Days": [
{
"FromDay": "2015-02-05",
"ToDay": "2015-02-06"
}
]
}
]
}

is handled using: data: "Days[, ].FormDay".
The solution above talks about using custom rendering of output using column.render.

what I am looking for:

If the FromDays has multiple values for each row of data returned, then I would like for the output for the column to be separated by new lines instead of commas. Is there a way to accomplish this?

Thank you.

This discussion has been closed.