How to create nested tables from multidimensional json resultdata
How to create nested tables from multidimensional json resultdata

Hi ,
I need help to generate table for my json results , i am unable to make it work on data table, do I need to make two data tables or it is achievable in single data table.
This discussion has been closed.
Answers
Basically the answer is yes you can do either. Here is a simple example of how to show the data in one table:
http://live.datatables.net/kucujotu/1/edit
It uses
columns.render
to render the array ofsites
objects into the column. Assuming that is what you want to do. Using Javascript map to iterate the specificsites
object. You can use any Javascript methods in the function to achieve the output you want.It accesses the data using
data.results
. If you are using theajax
option then you will use theajax.dataSrc
option to point toresults
You will want to look at the Nested Objects Example.
Please post any questions.
Kevin