datatables get all rows 1

datatables get all rows

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

table.rows().data().map((row) => {
  // each row is an array where each column is an element in the array
  // as a string
}

Here is what the above code is Doing:
1. Get the table object
2. Get the rows object
3. Get the data object
4. Map the data object to an array of arrays
5. Each row is an array where each column is an element in the array as a string

Similar Posts