Hi, thank you for such a great product. With regards to my question, I would like to extract aoData from datatables and save them on my server side to a json file. I do not need to load it back to the table directly. Followings is my code:
var table = $('#example').DataTable({
ajax: './d1/data.txt',
paging: false,
stateSave: true,
stateSaveCallback: function (settings,data) {
const state = JSON.stringify(settings.aoData);
console.log(state);
$.ajax( {
"url": "./d1/index.html",
"data": state,
"type": "POST",
"dataType":"json",
"success": function () {}
});
},
});
I do not if I am doing it right or wrong. I can see the aoData in the log but I do not know how to send it to my server. Many thanks.