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

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

<title>Ajax data source (arrays)</title>
<js><![CDATA[
$(document).ready(function() {
	$('#example').DataTable( {
		"ajax": "data/arrays.txt"
	} );
} );
]]></js>

<info><![CDATA[

DataTables has the ability to read data from virtually any JSON data source that can be obtained by Ajax. This can be done, in its most simple form, by setting the `dt-init ajax` option to the address of the JSON data source.

The `dt-init ajax` option also allows for more advanced configuration such as altering how the Ajax request is made. See the `dt-init ajax` documentation or the other Ajax examples for DataTables for further information.

By default DataTables will assume that an array data source is to be used and will read the information to be displayed in each column from the row's array using the column index, making working with arrays very simple (note that this can be changed, or objects may use the `dt-init columns.data` option, shown in other examples).

The example below shows DataTables loading data for a table from arrays as the data source, where the structure of the row's data source in this example is:

```
[
    "Tiger Nixon",
    "System Architect",
    "Edinburgh",
    "5421",
    "2011/04/25",
    "$3,120"
]
```

For more details on loading a DataTable with Ajax data, please refer to the [Ajax section of the manual](https://datatables.net/manual/ajax).

]]></info>

</dt-example>
