Answers for "add new value to firestore array field"

1

firestore add to field array

DocumentReference washingtonRef = db.collection("cities").document("DC");

// Atomically add a new region to the "regions" array field.
washingtonRef.update("regions", FieldValue.arrayUnion("greater_virginia"));

// Atomically remove a region from the "regions" array field.
washingtonRef.update("regions", FieldValue.arrayRemove("east_coast"));
Posted by: Guest on April-10-2021

Code answers related to "add new value to firestore array field"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language