I'm trying to upgrade my system to use 1.10 instead of 1.9 of DataTables and I'm trying to find a way to pass back the row contents using a JSON object instead of a list. Specifically instead of passing back data in the format [['data','data','data'],['data','data','data'],etc..] I want to put it in the format [['colA':'data','colB':'data','colC':'data']].
Right now I've got my AJAX function returning the data in that format and I'm trying to initialize with this code:
$("table").DataTable({
"columnDefs": [
{"name": "wo_status", "title": "wo_status", "targets": 0},
//repeat for each of my 20 or so fields
],
"serverSide": true,
"ajax": "url/to/ajax/function"
});
The results are coming back from my AJAX function correctly but DataTables is trying to find an index of 0 in row 0 and failing to find it because my table cells are indexed by their column name instead of a numerical index. Does anyone know how to tell DataTables to use the column names specified in columnDefs (or in some other option I haven't found) instead of numerical indices?
