JavaScript (arrays/objects)

At times you will wish to be able to create a table from dynamic information passed directly to DataTables, rather than having it read from the document. This is achieved using the data option in the initialization object, passing in an array of data to be used (like all other DataTables handled data, this can be arrays or objects using the data option).

jQuery DataTables Checkboxes extension requires that column containing checkboxes had unique data.

Table is initialized using the data shown below. Data is supplied as a value for data option. For simplicity, each element of the array corresponds to the appropriate column in the table. First element of the array holds the data for the column containing checkboxes and is unique (1, 2, 3, etc.).

  "data": [
      "Tiger Nixon",
      "System Architect",
      "Garrett Winters",
      "Ashton Cox",
      "Junior Technical Author",
      "San Francisco",

Example using array of arrays

Example using array of objects