How to use DT Ajax for populate other elements on screen?
How to use DT Ajax for populate other elements on screen?

Hi there!
I'm trying to use DataTables to populate her own table, but in same JSON I'm retrieving other things.
like this JSON:
{
"datatables": [ <!-- array of data --> ],
"otherData": []
}
And my ajax is like these:
ajax: {
url: url,
data: data,
dataSrc: 'datatables',
error: (response) => {
return console.error(response)
}
I'm want to know how to access "otherData" on drawCallback to generate all other elements on page.
Its possible?
Kind Regards
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi @drafenous ,
You can access it with
ajax.json()
,Cheers,
Colin
Its works, thanks alot!