How to update an array of objects in Firestore?

preview_player
Показать описание


This video explains how to update an array of objects in Firestore in two ways. The first solution is the one mentioned in the docs and the second is an alternative one.

#Firebase #FirebaseExpert #LearnFirebase #FirebaseTutorial #FirebaseCourse #FirebaseTrainer #FirebaseCoach

Follow me on:

#BetterTogether 🔥
Рекомендации по теме
Комментарии
Автор

Question, if we remove an element in the array, perform the changes we need and re-add to the array, then won't the array be added at the end of the array and not at the original index as an update should be? For example: You delete the array at index 0 in an array of three elements, and then when you add it again with new data using array union, it gets added to array and now has index 2?

shawkiizzat
Автор

Kudos to you.
I solved an array problem.

sajantamang
Автор

What if I have 100+ documents in collection("users") and all have "friends" array field, is there way I can specific target one document?

codingmafia
Автор

I have seperate arrays for each document for my collection... So how do I update any one object from that Arrays ??? I have edit and delete function.... delete function is working but edit function is not working... When I try to edit one object nothing happens in firestore..

gangasunny
Автор

What if we have two John in array so both values gets updated?

roheetjadhav
Автор

How do I put this code on Android Java, its complaining about OnCompleteListener, not requiring DocumentSnapshot

codingmafia