This repository was archived by the owner on Aug 7, 2023. It is now read-only.
How to store and update a field of type set in a base #634
Unanswered
freundewerbenfreunde
asked this question in
Help
Replies: 1 comment
-
|
Instead of creating a set, I created an object and saved the value as key and value |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi :)
Is there an example how to initalize and add values to such a field?
I tried the following, but it does not seem to work.
let values = new Set(); values.add("1h9bv231rxiv"); await db.putMany([{ "key": "mykey", "mysetfield": values }]);Leads to an empty JSON object in the base.
I am not sure about the syntax to add a value either, as there is no db.util.set method.
Beta Was this translation helpful? Give feedback.
All reactions