DataTables read ajax response with your own parameters
Old question, but i'll try to answer may need for future, because i have exactly same problem and after looking for their documentation i found drawCallback
.
From your code:
var myTable = $('#myTable').DataTable( {
"serverSide": true,
"ajax": {
"url" : "/response.php",
"method" : "POST"
},
"drawCallback": function (settings) {
// Here the response
var response = settings.json;
console.log(response);
},
});