Nested object array updates in Firestore

I've the following structure in a Firestore collection

`[
	{
		"questions_to_answer": 10,
        "level": {
            "$ref": "levels/kpEnyGZBYKovQ7snfJEL"
        },
		"questions": [
            {
				"question": "",
                "correct_answer": "",
                "tag": "Combination intro",
				"invalid_answers": [
                    {
                        "image": "",
                        "tag": ""
                    },
                    {
                        "image": "",
                        "tag": ""
                    }
				]
					
			}
			
		],
		"_id": "Lz9KIAN3Madiw5v3lSVd",
		"__metadata": {
            "segments": [
                "",
                ""
            ]
        }
		
	}
]`

I'm trying to update the tag property inside the inavlid_answers array. I'm using dot notation to target the tag property, but it always writes a new object in the collection instead of updating it.

I tried the following query to update the document but had no success.

{
"questions.[0].invalid_answers.[0].tag": "new_tag_value"
}

I can make it dynamic, but it is writing a new element instead of updating it.

I solved this issue. My understanding was wrong. You have to pull the complete object from Firestore, modify it, and send it back to Firestore for updating.