Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

SOLVED: How to store and update a localStorage key object which has properties of different data types?

user6561572:

this is my first time using localStorage and I would like to store a localStorage key which is an object that has properties of different data types ,for example the key "localstor" ,it is an object containing two properties :


localstor= { userMsg : String , userInfo : (Object) { ID: String , username: String , pwd :String } }

the property userMsg is of type String while the property userInfo is of type object.

I know how to set and get an item containing only objects based on this question , but in my case I don't know how to set and get this kind of key? and espacially if I want to update the object userInfo in localstor how to do that?

Any help is appreciated.



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
This Question have been answered
HERE


This post first appeared on Stack Solved, please read the originial post: here

Share the post

SOLVED: How to store and update a localStorage key object which has properties of different data types?

×

Subscribe to Stack Solved

Get updates delivered right to your inbox!

Thank you for your subscription

×