json - jquery syntax - what's the difference between "[[" and "[{" -


i have jquery table expecting data in format:

  {     "draw": 1,     "recordstotal": 57,     "recordsfiltered": 57,     "data": [         [             "angelica",             "ramos",             "system architect",             "london",             "9th oct 09",             "$2,875"         ],         [             "ashton",             "cox",             "technical author",             "san francisco",             "12th jan 09",             "$4,800"         ]     ] } 

i'm using lua json library , when encode data, following:

{     "draw": 1,     "recordstotal": 57,     "recordsfiltered": 57,     "data": [         {             "angelica",             "ramos",             "system architect",             "london",             "9th oct 09",             "$2,875"         },         {             "ashton",             "cox",             "technical author",             "san francisco",             "12th jan 09",             "$4,800"         }     ] } 

the differences in use of curly brackets each record, instead of square brackets. when jquery datatable sees curly braces, dies.

i have 2 questions: 1. what's difference between two? 2. how can encode data square bracket instead of curly?


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -