Make the returned JSON into a global array.
Make the returned JSON into a global array.
classic12
Posts: 228Questions: 60Answers: 4
in DataTables
I am using the following to bring back some JSON data.
I want to use
var selectedArray =[] // global array.
How do I assign the returned data to selectedArray
ajax : {
'url' : 'http://www.xxxx.com/php/xxxx.php',
"type": "POST",
"data": {
'selectedInvoiceID': selectedInvoiceID
}
},
Cheers
Steve Warby
This discussion has been closed.
Answers
Use the
xhr
event to gain access to the JSON returned by the server, and you can assign it to your variable as required there.Allan