Can datatables display data from complex JSON, and can it easily be grouped?

Can datatables display data from complex JSON, and can it easily be grouped?

theukdavetheukdave Posts: 1Questions: 1Answers: 0

I have a data structure something like this:
http://jsfiddle.net/vfdVC/

Such a structure should produce 5 rows, one for each item. But the items are not all in one level like all of the examples I can find on the site, they are nested inside of the packages. I cannot figure out how to pull the data out to display the 5 rows. Is it possible?

If so, I would then LOVE to figure out how to apply an expand/collapse capability, like shown here:
http://datatables.net/examples/api/row_details.html

Where the grouped row represents the 'package', and you can expand to show the child 'items'. Assuming the first part of the question isn't unachievable, how can I then store the parent package item to be used on a grouping row?

Many thanks,
Dave

This discussion has been closed.