I have an Array like this:
I need to add another id to group_name = Group 2 (add a new id to devices).
I have an Array like this:
I need to add another id to group_name = Group 2 (add a new id to devices).
Currently this is not possible with firestore as in this question. I would suggest to make the outer array an object and then it would be possible to do somthing like this:
firestore.instance.
.collection('friendships')
.document(caller.data["uid"])
.updateData({
"groups.groupId": {
FieldValue.arrayUnion({
friendDisplayName: snapshot.data["friendDisplayName"],
friendUid: snapshot.ref
})
});