dataTables: at jquery.dataTables.min.js:48
dataTables: at jquery.dataTables.min.js:48
Cannot read property 'length' of undefined. in file no Error. But in Ajax It isn't
```Uncaught TypeError: Cannot read property 'length' of undefined
at jquery.dataTables.min.js:48
at i (jquery.dataTables.min.js:35)
at Object.success (jquery.dataTables.min.js:35)
at i (jquery-2.2.3.min.js:2)
at Object.fireWith [as resolveWith] (jquery-2.2.3.min.js:2)
at z (jquery-2.2.3.min.js:4)
at XMLHttpRequest.<anonymous> (jquery-2.2.3.min.js:4)
Here's my json data
"{ "data":[{"ID":2,"firstName":"john","lastName":"j","gender":"male","fatherName":"ted","nationalCode":"1757549226","deleted":"0"}] }"
Used version:
Javascript Code:
```var table = $('#example').DataTable( {
//"processing": true,
//"serverSide": true,
"ajax": {
"url": "http://localhost:8080/LabEver/person/persons",
"type": "GET",
},
"columns": [
{ "data": "ID" },
{ "data": "firstName" },
{ "data": "lastName" },
{ "data": "nationalCode" },
{ "data": "gender" },
{ "data": "fatherName" },
{ "data": "deleted" },
],
});
Replies
Could you run the debugger on the table, or link to the page please.
Allan