I have a problem about populating datatables.js using json object, Can I use the ajax response value as the data for the datatable?
$.ajax({
url:"php_action/searchloc.php",
type:"POST",
data:{
origin: $('#from').val(),
destination: $('#to').val()
} ,
dataType:"json",
success:function(data){
$('#schedule').dataTable( {
"ajax": data,
columns: []
} );
},
error:function(){
alert("error");
}
});