<?xml version="1.0" encoding="UTF-8" ?>
<dt-example table-type="ajax" order="3">

<css lib="datatables" />
<js lib="jquery" />
<js lib="datatables" />

<title>Nested object data (objects)</title>
<js><![CDATA[
$(document).ready(function() {
	$('#example').DataTable( {
		"processing": true,
		"ajax": "data/objects_deep.txt",
		"columns": [
			{ "data": "name" },
			{ "data": "hr.position" },
			{ "data": "contact.0" },
			{ "data": "contact.1" },
			{ "data": "hr.start_date" },
			{ "data": "hr.salary" }
		]
	} );
} );
]]></js>

<info><![CDATA[

DataTables has the ability to use data from almost any JSON data source through the use of the `dt-init columns.data` option. In its simplest case, it can be used to read arbitrary object properties, but can also be extended to _n_ levels of nested objects / arrays through the use of standard Javascript dotted object notation. Each dot (`.`) in the `dt-init columns.data` option represents another object level.

In this example `hr.position` refers to the `position` property of the `hr` object in the row's data source object, while `contact.0` refers to the first element of the `contact` array. Any number of dots can be used to obtain deeply nested data.

The example below shows DataTables reading information for the columns from nested objects and arrays, where the structure of the row's data source in this example is:

```
{
    "name": "Tiger Nixon",
    "hr": {
        "position": "System Architect",
        "salary": "$3,120",
        "start_date": "2011/04/25"
    },
    "contact": [
        "Edinburgh",
        "5421"
    ]
}
```

]]></info>

</dt-example>
