Saving multiple values or objects
See original GitHub issueHi Eddy,
just to be sure this is the right way, I have a user object that I would like to save, maybe not entire object, but most of the fields, so would like to know if there is a way to pass multiple values in one set method or I need to create n calls to set each value separately. The other question is if I send object to set, do you convert it to string or that is needed to be done before setting the value?
right now I’m saving multiple times…
this.secureStorage.set({
key: "user_email",
value: user.email
});
this.secureStorage.set({
key: "user_id",
value: user.id
});
this.secureStorage.set({
key: "user_name",
value: user.first_name
});
thanks
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Storing multiple values from the same object in an Array
Save this question. Show activity on this post. I am trying to create an Array with all these values form the Detail Class....
Read more >Storing Multiple Values in Lists — Lesson 4 - YouTube
In this video lesson we explain what a for loop does, show how to correctly write for loops to repeat simple calculations, ...
Read more >Storing Multiple Values in Lists – Programming with Python
In Python, a list is a way to store multiple values together. In this episode, we will learn how to store multiple values...
Read more >Saving multiple values to one Datastore? - DevForum | Roblox
A table is container that can store multiple values, but you can't store objects(Instances). Also, you will have to make your table readable ......
Read more >Storing multiple values in one State - DEV Community
We will learn how we can store multiple values in single state using useState hook in functional component. demo. Step 1: import useState...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@davorpeic you don’t need to convert so string value can be an object and the key should be a string.
If you want you can create a new object and store only the fields you would like, or a entire object
Example:
The problem is the underlying system on iOS (keychain, exposed through the SAMKeychain library) doesn’t allow anything other than strings. Android allows any type, but that’s the reason the TS definition specs string.
I will add an example for stringify and parse to the readme 👍