I'm trying to migrate to DataTables Table plug-in for jQuery
What is the right way to make below json Results to work with datatables's Object data source? I tried the nested Object data source example and others, but still not working:
{
"query": {
...
"diagnostics": {
"publiclyCallable": "true",
"url": {
"execution-start-time": "1",
...
},
"user-time": "68",
},
"results": {
"item": [
{
"title": "",
"description":
......
I tried this:
$('#example').DataTable( {
"processing": true,
"serverSide": true,
"ajax": "scripts/objects.php",
"columns": [
{ "query.results.item": "title" },
{ "query.results.item": "description" },
{ "query.results.item": "position" },
{ "query.results.item": "office" },
{ "query.results.item": "start_date" },
{ "query.results.item": "salary" }
]
Error is:
SyntaxError: missing ; before statement
{"query":{"count":16,"created":"2016-03-30T02:41:49Z","lang":"en-US"
Thanks a lot!