var table = $('#data-table').DataTable(
{
ajax: {
type: 'GET',
url: '/temperature'
},
bFilter: false,
"bLengthChange": false,
aaSorting: [],
columns: [
{data: "t"},
{data: "c"}
]
}
);
I have the above code to consume some JSON data to populate a table using DataTables (https://datatables.net/). The JSON format is like below:
{data: [{t:1459192455326, c:2},{t: 1459192455326, c:3}]}.
So how can I do some post processing of the returned JSON (convert the timestamp to human readable form) in order to render the table?