I am using jQuery dataTables for grids (http://www.datatables.net/).
However my json is formatted differently than the json example included with dataTables docs. Is it possible for dataTables to interpret the formatting in our json?
Their json looks like this
{"aaData": [
[
"Trident",
"Internet Explorer 4.0",
"Win 95+",
"4",
"X"
],
[
"Trident",
"Internet Explorer 5.0",
"Win 95+",
"5",
"C"
]
]
}
My JSON looks like this and unfortunately I can’t change it to look like the example included in their docs.
"allconfig": {
"card.inserted": {
"value": "Not Inserted",
"type": "enum",
"range": "",
"clone": false,
"archive": false,
"access": "R"
},
"card.cisproc": {
"value": "Processed",
"type": "string",
"range": "",
"clone": false,
"archive": false,
"access": "R"
}
}
}
Here is my jQuery
$(document).ready(function() {
$('#example').dataTable( {
"bProcessing": true,
"sAjaxSource": 'json/test.json'
});
});
You can change your json format to required format.
Use
check http://jsfiddle.net/JASdL/