DataTables AJAX source example - deep property reading for a data source

Preamble

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.

Live example

Rendering engine Browser Platform(s) Engine version CSS grade
Rendering engine Browser Platform(s) Engine version CSS grade

Initialisation code

$(document).ready(function() {
	var oTable = $('#example').dataTable( {
		"bProcessing": true,
		"sAjaxSource": "sources/deep.txt",
		"aoColumns": [
			{ "mDataProp": "engine" },
			{ "mDataProp": "browser" },
			{ "mDataProp": "platform.inner" },
			{ "mDataProp": "platform.details.0" },
			{ "mDataProp": "platform.details.1" }
		]
	} );
} );

Other examples