I fill a datatable via ajax with the code below, but I need to rename the columns with the ajax return as well. How to do to rename the columns of the datatable with return json?
var table = $('#my_table').dataTable({
serverSide: true,
searching: false,
bAutoWidth:false,
bFilter: true,
bLengthChange: false,
responsive: true,
ajax: 'clientes.php',
dataSrc: 'data',
columns: [ {"sTitle":"#", "data":"client_id"},{"sTitle":"Name", "data":"client_name"},{"sTitle":"Contact", "data":"client"} ]
});