for me, I'm using firebase SDK for flutter, and nodeJS env. for cloud functions,, and I discovered the below solution.
this is a little bit of a hacky workaround
maybe we can save the list in a form of map not an array,, by using the array indexes as key strings to the sub maps
so you have structured the data like this in cloud fire store
key1: "value1" --> string
key2: --> map
> "0": {subKey1: "subValue1", subKey2: "subValue2"}
> "1": {subKey3: "subValue3", subKey4: "subValue4"}
> "2": {subKey5: "subValue5", subKey6: "subValue6"}
for example : if you want to update the subValue4, you may do this
await docReference.update({key2.1.subKey4: "theNewValueHere"});
and this ends up updating that document in cloud firestore to a document that looks like this
key1: "value1" --> string
key2: --> map
> "0": {subKey1: "subValue1", subKey2: "subValue2"}
> "1": {subKey3: "subValue3", subKey4: "theNewValueHere"}
> "2": {subKey5: "subValue5", subKey6: "subValue6"}
if you notice in firebase,, it updates the entire field key2
in this operation,, but gave you an easier access to update that index..
My problem is that I have to restructure all fields having list of maps to become maps within a map to have that access
And I will not do that,, will not refactor my entire db to do that,, I retrieve the entire doc,, (costs 1 read) modify at client and update the entire doc again (1 write)
I don't like it, but maybe someday I would use it