I am trying to store a multi dimensional (2 dimension) array in JavaScript phonegap using localstorage.setitem
However, it seems to convert the array into a single dimension.
Is there any way to maintain the array structure when stored locally?
Thanks.
I had the same problem and I used the following solution to make it work:
By default, localStorage only supports strings as storage formats. You can’t store results of JavaScript computations that are arrays or objects, and every number is stored as a string – http://24ways.org/2010/html5-local-storage.