Well, basically what you've got there is a JSON representation of an array of objects (with properties startDate, endDate, ...), but what you need is an array of arrays of strings.
I'm assuming you are doing server-side processing, so if you don't want to change the server code, you can get just in the middle of the fetching process and modify the data right before giving it to the callback of datatables.
What I do next is just going through each object in the fetched data and create the array of values:
$('#example').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "scripts/server_processing.php",
"fnServerData": function ( sSource, aoData, fnCallback ) {
$.getJSON( sSource, aoData, function (json) {
/* --- Here is where we massage the data --- */
/* if the variable "json" is just a string (I forgot) then evaluate it first into an object (download a json library)*/
var aaData=[];
$.each(json, function(index, object) {
var aData=[];
$.each(object, function(key, value) {
aData.push(value); //be careful here, you might put things in the wrong column
});
aaData.push(aData);
});
/* --- And after we're done, we give the correctly formatted data to datatables --- */ /* --- if "json" was a string and not an object, then stringify aaData first (object to json notation, download a library) --- */
fnCallback(aaData)
} );
}
} );
} );
Hope it works!
jsonobject.aaData[0]?delete aaData[0][clientId]in js]at the end :)