SCRIPT5007 Unable to get property 'aDataSort' of undefined or null reference
SCRIPT5007 Unable to get property 'aDataSort' of undefined or null reference
hifni
Posts: 4Questions: 3Answers: 0
Uses: Microsoft Edge; Windows 10.
My objective was to push a JavaScript array object as data sournce and I am finding it really difficult to make it work.
While debugging I found this error in Edge's Developer Tool:
SCRIPT5007: Unable to get property 'aDataSort' of undefined or null reference
I have my JavaScript as
$(document).ready(function() {
var arr = [];
for (var i = 0; i < 5; i++) {
var item = {};
item["c1"] = "a" + i;
item["c2"] = "b" + i;
arr.push(item);
};
var dataSet = JSON.stringify(arr);
console.log(dataSet);
$('#example').DataTable({
"data": dataSet
});
});
This discussion has been closed.