Firestore Fieldvalue Increment With Nested Object And Variable Field-name Not Working
I understand to use Firestore FieldValue increment function in the nested object I need to mention the completed path in the update method. My Ionic 5 project's main method takes t
Solution 1:
This should work:
this.afs.doc('path').update({
["count." + attr]: firebase.firestore.FieldValue.increment(1);
});
Post a Comment for "Firestore Fieldvalue Increment With Nested Object And Variable Field-name Not Working"