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 ajax option to the
address of the JSON data source.
The ajax option also allows for
more advanced configuration such as altering how the Ajax request is made. See the 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 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.