Reputation: 523
i am trying to delete an index inside array
I want the user to delete the selected car so it could be index 0 or whatever
Upvotes: 1
Views: 204
Reputation: 7921
My opinion is fetch the document and delete the item at which index you want from the local array and update the remote document. Or you can use .document('docID').updateData('cars': FieldValue.arrayRemove([{the-item-map}]));
. Maybe there are other options but these two options are acceptable, I prefer to use first one.
Upvotes: 2