I tried to update a maped data inside of another mapped object. It shows this message

The updateDoc() function takes a DocumentReference as first parameter and not a DocumentSnapshot. Try refactoring the code as shown below:
// Pass reference of that document, cityRef in this case
// You can also access the doc ref by `artichoke.ref` as well
updateDoc(cityRef, {
maxCart: {
tomato: {
cart: false
}
}
})