You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 4, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: docs/FIRESTORE.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -219,7 +219,10 @@ query
219
219
```
220
220
221
221
### Adding to (`arrayUnion`) and removing from (`arrayRemove`) Arrays
222
-
If you don't want to set the entire contents of an Array, see [the official docs (at the bottom: "Update elements in an array")](https://firebase.google.com/docs/firestore/manage-data/add-data) and use this:
222
+
If your document contains an array field, you can use `arrayUnion()` and `arrayRemove()` to add and remove elements.
223
+
224
+
*`arrayUnion()` adds elements to an array but only elements not already present.
225
+
*`arrayRemove()` removes all instances of each given element.
0 commit comments