{hero}

searchBuilder.getDetails()

Since: SearchBuilder 1.0.0

Get the details of the current search setup.
Please note - this property requires the SearchBuilder extension for DataTables.

Description

This method provides the ability to get the details of the data structure and search criteria that is being applied to the DataTable by SearchBuilder's filtering.

Since version 1.2.0 searchBuilder.getDetails() takes one optional argument, deFormatDates. This is a boolean flag that when true deformats dates down to an ISO 8601 standard. The object that is returned represents all of the groups and criteria that are in place. The object can be passed into the searchBuilder.rebuild() function to make SearchBuilder reset to the point at which the object was created.

The object structure is the same as would be used for preDefined searches. Please refer to the searchBuilder.preDefined documentation for more details on the structure.

Type

function searchBuilder.getDetails()

Description:

Gets the details of the current search.

Parameters:
Returns:

Returns an object containing the details of the current search. The structure is the same as searchBuilder.preDefined, please refer to that documentation for more details on the structure.

Examples

Get the details of a Search::

var dt = $('#example').DataTable( {
	dom: 'Qlfrtip'
});

var d = dt.searchBuilder.getDetails();

Get the details of a Search and de-format dates::

var dt = $('#example').DataTable( {
	dom: 'Qlfrtip'
});

var d = dt.searchBuilder.getDetails(true);

Related

The following options are directly related and may also be useful in your application development.