updating nested map specific value reset the entire map? #108
Unanswered
Mahsanali0786
asked this question in
Q&A
Replies: 1 comment
-
I'm not sure exactly what your data is supposed to look like, but it looks like you're trying to access nested maps inside I don't think Firebase can interpret 'map.map2.field' as "field inside two nested maps", but rather it's overwriting the field 'map.map2.field' with 'value'. Your options are to either get the latest version of the map, update it locally and write it again, or use nested document/collections. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
await Firestore.instance
.collection('myCollection')
.document('myDocument')
.update(
{'map.map2.field': 'value'},
);
in the above code when i try to update the field in map it just delete all the values. Kindly guide me?
Beta Was this translation helpful? Give feedback.
All reactions