Hello,
I’m looking at using Firebase but I’m having trouble getting it to work as I would like.
From what I understand from Google’s documentation, there are two ways to add data to the database, set() and add(). Let’s say I have the following database structure:
users: {
userKey: {
c1: {
v1: true
}
}
}
and I want to add as a child of c1, {v2: true}. However, when I use setUserValue(“c”, {v2: true}), it completely recreates c1, deleting anything else that might be in there. I would rather have something like “addUserValue(“c”, {v2: true})” that would then give me:
users: {
userKey: {
c1: {
v1: true
v2: true
}
}
}
I can’t find anything in the documentation. How would I go about accomplishing this?
Thank you,
Eric