Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81728

Iterate through object (array) within returned JSON array

$
0
0

Here's the returned json:
[{
"name":"2017 Dues",
"bill_yr":"2017",
"status":"inactive",
"schedules":[["sched A"],["sched B"],["sched C"],["sched D"]
]},
{
"name":"2018 Dues",
"bill_yr":"2018",
"status":"
"schedules":[["sched A"],["sched B"]
]},

Here's ajax:
$('#example').DataTable( {
processing: true,
select: true,
ajax:
{
"url": "../results.php",
"type": "post",
"data": {
"cycles": "submitted",
"key": "123"
},
"dataType": 'json',
"dataSrc": "",
},
columns:
[
{"data": 'name'},
{"data": 'bill_yr'},
{"data": 'status'},
{"data": "schedules"} ** What to do here to iterate over schedules? **
]
});

I would like to have a row like this:
2017 Dues | 2017 | inactive | sched A <br /> sched B


Viewing all articles
Browse latest Browse all 81728

Trending Articles