Bug with dataSrc ?

Bug with dataSrc ?

mathieuvmathieuv Posts: 2Questions: 1Answers: 0

Hello,
this maybe a misunderstanding from myself reading the api doc,
but I think dataSrc is broken,

If you take the full code of Ajax Object example : https://datatables.net/examples/ajax/objects.html
then change the root node from "data" to, say, "list"
and use the option
"dataSrc": "list"

in init code

you get a javascript error "Uncaught TypeError: Cannot read property 'length' of undefined" in https://cdn.datatables.net/1.10.9/js/jquery.dataTables.min.js
line 47

ajax data are now
{
"list": [
{
"name": "Tiger Nixon",
"position": "System Architect",
"salary": "$320,800",
"start_date": "2011/04/25",
"office": "Edinburgh",
"extn": "5421"
},
[. cut for clarity ..]
}

This question has an accepted answers - jump to answer

Answers

This discussion has been closed.