fnAddData not working with nested data names
fnAddData not working with nested data names
suffixer
Posts: 3Questions: 1Answers: 0
Hi, am I doing something wrong, or is this a bug?
jsfiddle; click item on the master list, should add to "Selected"
1 Works (single nested JSON source):
https://jsfiddle.net/xfxf/nkp1gwp4/
https://catstick.com/jsfiddle/depth1.json
2 Doesn't Work (double nested JSON source):
https://jsfiddle.net/xfxf/700vat5b/
https://catstick.com/jsfiddle/depth1.json
fnAddData does not appear to like nested data names.
Differences with #2:
- selectedtable is reading 'depth2' json
- selectedtable columnDefs data are nested as per https://datatables.net/examples/ajax/deep.html
- fnAddData is changed to the nested names
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
JSON url in #2 should be https://catstick.com/jsfiddle/depth2.json (is correct in the jsfiddle)
Your JSON file has:
But your fnAddData uses:
They are not the same. You want to use the same format for both. e.g.:
Allan
Aah, that works perfectly - thanks!