The ability of DataTables to read arbitrary object properties as a column data source is extended to n levels of objects, through the use of standard Javascript dotted object notation. For example in this example "platform.details.0" refers to the first element of the array "details", of the object "platform", for each column. Any level of 'dots' can be used.
Rendering engine | Browser | Platform(s) | Engine version | CSS grade |
---|---|---|---|---|
Rendering engine | Browser | Platform(s) | Engine version | CSS grade |
$(document).ready(function() { var oTable = $('#example').dataTable( { "bProcessing": true, "sAjaxSource": "sources/deep.txt", "aoColumns": [ { "mData": "engine" }, { "mData": "browser" }, { "mData": "platform.inner" }, { "mData": "platform.details.0" }, { "mData": "platform.details.1" } ] } ); } );
The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.