i want to update a document in a sub collection where i query it by a condition
//The method 'update' isn't defined for the type 'Query'
games.doc(invCode).collection('usersInGame').where('answer', isEqualTo : 'value')
my try is to get the doc
games.doc(invCode).collection('usersInGame').where('answer', isEqualTo : 'value')
..then((value) => value.docs.map((e) {
games
.doc(invCode)
.collection('questions')
.doc(e.id)
.update({'answer': ''});
}))
but it does not update in firestore any help ?