i’m new to html5 web storage
setting to a web storage is easy.
sessionStorage.someKey = 'someValue';
but when i setting a array or object to a key like
sessionStorage.name = ['abc','def'];
typeof sessionStorage.name;
//output "string"
//a object is the same
so how to use array or object in web storage? or there is a better way to solve this?
I have used data structure in the past like this by using JSON. Here is a sample…
Then you can get the data like so…