Multidimensional JSON array bug

So I am saving a multidimensional array to a json file for my app and it works fine unless I do something like this:
[lua]jsonArray[i][j].name = blahblah[/lua]

When I add the “.name” to the array it throws me an error but once I take it out everything works fine. Unfortunataley I need to be able to right my arrays like this. Is this a bug or do I need to find an alternate solution?

Below is the error and here is the code: http://pastebin.com/iu1LkqPZ
[lua]Runtime error
/Users/*/main.lua:10: attempt to index field ‘?’ (a number value)
stack traceback:
[C]: ?
/Users/*/main.lua:10: in main chunk[/lua]

EDIT: I forgot to mention that it saves correctly without error and produces valid JSON it just doesn’t load correctly from a file. [import]uid: 63320 topic_id: 25492 reply_id: 325492[/import]