SCRIPT5007 Unable to get property 'aDataSort' of undefined or null reference

SCRIPT5007 Unable to get property 'aDataSort' of undefined or null reference

hifnihifni Posts: 4Questions: 3Answers: 0
edited August 2016 in Free community support

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
        });
});

My JS Fiddle

This discussion has been closed.