JSON aaData at second level?

JSON aaData at second level?

cfanscfans Posts: 8Questions: 0Answers: 0
edited November 2010 in General
Is it possible to have
[code]
{
"tableData": {
"aaData": [
["cell00", "cell01", "cell02"],
["cell10", "cell 11", "cell12"]
]
},
"other": "something"
}
[/code]

Really the point would be here that I want aaData to be at the second level within the JSON data, how would I achieve this?

Replies

  • cfanscfans Posts: 8Questions: 0Answers: 0
    any thoughts?
  • peterkronenbergpeterkronenberg Posts: 112Questions: 0Answers: 0
    You could have your data like that and just pass aaData[0] to DataTables
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    If you use fnServerData ( http://datatables.net/usage/callbacks#fnServerData ) you can pass in something like "json.tableData.aaData" to DataTables as the array to be used.

    Allan
This discussion has been closed.