1 success: function(respone){
2 table.destroy(); //destruy allow to reinitialize
3 const res = JSON.parse(respone); // parse if got encode in server
4 const response_object = res.data;
5 // data:{['record','record'],['record','record']...}
6
7 console.log(response_object);
8
9 $('#table_id').DataTable( {
10 data: response_object,
11 // datatablesetting....
12 } );
13 }