I am trying to use associative arrays with redux and to store them in the async storage to retrieve on loading the app.
With redux it works very well I have real quick access to the values and can map the content very well into cards in the react native app.
Now when I store the data in async storage I have to JSON.stringify the content and JSON.parse it back on loading. Unfortunately somehow I cannot use the object the same way afterwards.
my data looks like this:
['1442-3338': { ID: '1442-3338', something: 'something', Participants: [] }, '1442-3339': { ID: '1442-3339', someting: 'something', secondArray: {} }, '1442-3340': { ID: '1442-3340', something: 'something', secondArray: {} }, '1442-3341': { ID: '1442-3341', something: 'something', secondArray: {} } ]
I can access the data via object['1442-3338']
, then after storing into the storage and getting it back, which includes JSON.stringify on store and JSON.parse on load, I cannot read the data like that anymore - keys are not recognized.