use two different json in one datatable
use two different json in one datatable
denizdiana
Posts: 15Questions: 8Answers: 0
Hello everyonee,
I want to ue two different json object in one datatable. My datatable is like this,
$('#table').DataTable(
{
ajax: {
"url": "myurl",
"type": "GET",
"datatype": "json",
"dataSrc": "person"
},
aoColumns: [
{ mData: 'name' },
{ mData: 'surname' },
{ mData: 'email' },
{ defaultContent: '<input type="button" class="Edit" value="Edit"/><input type="button" class="Delete" value="Delete"/>' }
],
});
now, I want to add one column and I want to use another json in that column. How can i do that?
Thank you.
This discussion has been closed.
Answers
You would need to merge the JSON first before initialising the table. Although you could possibly issue an Ajax request in the
columns.render
, I've not tried that.Colin