concat()

Since: DataTables 1.10

Combine multiple API instances to create a single new instance.

Description

The concat() method will combine the result set of two or more DataTables API instances into a single API instance.

This method makes use of the fact that DataTables API objects are "array like", in that they inherent a lot of the abilities and methods of the Javascript Array type. In this case, this method is a proxy for the Javascript Array.prototype.concat method and is provided as a utility method for the DataTables API. For more information about the original method, please refer to the Mozilla MDN documentation for concat.

Type

function concat( a [, b [, ... ] ] )

Description:

Concatenate two or more API instances together

Parameters:
Returns:

New API instance with the values from all pass in instances concatenated into its result set.

Example

Concat data from two sources:

var table = $('#example').DataTable();

var data = table.column( 0 ).data()
	.concat( table.column( 1 ).data );