Retrieving row data after filtering JQuery Datatables

As of Datatables 1.10, there is a built-in way to get the filtered or unfiltered rows after a search.

var table = $('#example').DataTable();
table.rows( {search:'applied'} ).nodes();
table.rows( {search:'removed'} ).nodes();

There are other options for getting only the current page or all pages as well as the order. More details here: http://datatables.net/reference/type/selector-modifier


The easiest way to do this is actually built right in to the DataTables API:

_('tr', {"filter": "applied"})

Used in a Function:

function get_filtered_datatable() {
    var filteredrows = $("#mydatatable").dataTable()._('tr', {"filter": "applied"});

    for ( var i = 0; i < filteredrows.length; i++ ) {
        debug.console(filteredrows[i]);
    };
}