JSON oddness

I used json.encode to write a numerically indexed array to storage.
The values in the array are numbers too.

json gives me this kind of thing:
{“1”:442,“2”:394,“3”:429,…

The trouble comes when I read it back.
The documentation says that numerically indexed array should be recovered as such, but what I get back is a set of string pairs

newArray[“1”] contains “442”

and this means I can’t access element [2], its [“2”]

================
I have worked around it by using a loop containing

realArray[x] = pairsArrayfromJson[tostring(x)] *1

but yeuch…

How does anyone else save and load a simple numerically index array ?

[import]uid: 108660 topic_id: 23140 reply_id: 323140[/import]

I have the same problem there now… not likeing it much and havent found a solution yet. I did something like you did to convert it but would rather not have to do that. I would like the file to work the same way as when it was loaded after being saved :frowning: [import]uid: 17969 topic_id: 23140 reply_id: 100294[/import]

same here… [import]uid: 90610 topic_id: 23140 reply_id: 100302[/import]