Flatten a 2D array structured API instance to a 1D array structure.
This method will reduce a 2D array structure to a simple 1D structure, which can be particularly useful when working with the plural methods such as
columns() which can return 2D structures data (for example in the columns data, each column has its own array of information).
Reduce a 2D array structured API instance to a 1D array structure.
New API instance with the 2D array values reduced to a 1D array.
Get the data from two columns in a single array:
var table = $('#example').DataTable(); var data = table .columns( [0, 1] ) .data() .flatten();