Get sent parameters without server-side processing
Get sent parameters without server-side processing

"When making a request to the server using server-side processing, DataTables will send the following data in order to let the server know what data is required:" https://datatables.net/manual/server-side
Is there a way to get a JSON object of that data while Datatables is in client-side mode?
I imagine it would be something along the lines of table.ajax.params() where I could call a function and have it return me a JSON object of the table's current sort, search, etc. configurations.
This question has an accepted answers - jump to answer
Answers
There are various API's that can be used such as:
order()
page.info()
search()
Here is a list of them.
https://datatables.net/reference/api/
Kevin
I am trying to get an array of column names as well and I found column().name() method. From what I understand, this method will only be available in DataTables 2.0.0?
EDIT: I have found how to get an array of columns
var columnNamesArr = table.columns().header().toArray().map(x => x.innerText);
As you said, you can use
ajax.params()
to get what was set to the server, orajax.json()
to get what was returned. See example here - it shows both in the console when you click the button.Colin