Issue
I have something like the following:
Storage.remove({key: 'somedata'}).then(r => {
Storage.set({key: 'somedata', value: data}).then(g => {
Storage.get({key : 'somedata'}).then((val) => {
console.log('Your json is', val);
});
});
});
I get data from my API in JSON from and try to store it.
When I then try to output the stored data in the console I get the following
I am wondering how I can get the actual data instead of it being object object
Thanks
Update - screenshot of error with potential solution:
Solution
In my opinion, I think you can try this
Storage.remove(key).then(r => {
Storage.set(key, data).then(g => {
Storage.get(key).then((val) => {
console.log('Your json is', val);
});
});
});
Answered By - Wang YinXing
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.