I have an array with objects like this:
console.log(data);
Shows this in the console:
(40) […]
0: Object { id: 368802, start: "52990", start_id: "ABC", … }
1: Object { id: 329340, start: "52991", start_id: "DEF", … }
2: Object { id: 337521, start: "52992", start_id: "GHI", … }
...
How can I pass it into datatables? This doesn't seem to work
table_direct = $('#table_direct').DataTable({
dom: 'Bflrtip',
ajax: data,
columns: [
{ "data": "start" },
{ "data": "start_id" }
]
});
data, notajax, as you're providing an array of content.