datatables get rows data code example
Example 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
}
Example 2: jquery datatables get selected row data
var table = $('#example').DataTable();
$('#example tbody').on( 'click', 'tr', function () {
console.log( table.row( this ).data() );
} );