Answers for "remove and element from array firebase swift 5"

0

remove and element from array firebase swift 5

let washingtonRef = db.collection("cities").document("DC")

// Atomically add a new region to the "regions" array field.
washingtonRef.updateData([
    "regions": FieldValue.arrayUnion(["greater_virginia"])
])

// Atomically remove a region from the "regions" array field.
washingtonRef.updateData([
    "regions": FieldValue.arrayRemove(["east_coast"])
])
Posted by: Guest on December-02-2020

Code answers related to "remove and element from array firebase swift 5"

Code answers related to "Swift"

Browse Popular Code Answers by Language