DataTables example - AJAX custom data source example

When loading data from an Ajax source, by default, DataTables will look for the data to use in the data parameter of a returned object (e.g. { "data": [...] }). Using the dataSrc option of the ajax initiation option you can easily tell DataTables to look for something else.

The ajax.dataSrc has a number of ways in which it can be used:

The example below shows ajax.dataSrc being used as a string to get the data from a different source property.

Name Age Position Office Start date Salary
Name Age Position Office Start date Salary

Basic Init

Advanced Init

Styling

Data Sources

Ajax

Server Side

Api

Plug-ins