Assign Data fetched by ajax to a variable
Assign Data fetched by ajax to a variable
sarthaks21
Posts: 41Questions: 8Answers: 0
Hey All!
I'm using a datatable whose data source is fetched through ajax, i.e.,
var top_level_table = $('#table_L1').DataTable(
{
serverSide: true,
"ajax" : {
"url" : "static/tableviewer/table_contents.json",
'dataSrc' : 'data_root'
},
dom: 't',
searching: false,
paging: false,
bInfo: false,
fixedHeader: true,
columns: columns_datatable,
responsive: true
});
I want to store the data the ajax fetches in a variable for future usage.
Thanks for your time!
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
You can get the last data sent by calling
ajax.json()
,Colin