Reputation: 728
I am trying to update a subfield on firebase but I couldn't figure out how to only update one field at a time.
This is how my Firebase table looks like;
And this is how I'm trying to do it:
And lastly, this is how it looks after the update:
This is seriously taking time and I couldn't find any videos that shows how to update a field only. Everyone just updates the document as a whole. Thanks in advance people.
Upvotes: 0
Views: 241
Reputation: 124
dbRefUser.updateData({"properties.currentCashBalance": currentCashBalance + ourTransaction.amount });
Use this. I think it will work.
Upvotes: 2