I'm trying to replace a map in Firestore with this code (Dart/Flutter):
await FirebaseFirestore.instance.collection("test").doc("test").set({
"abc": {"def": 123}
}, SetOptions(merge: true));
await FirebaseFirestore.instance.collection("test").doc("test").set({
"abc": {"abc": 123}
}, SetOptions(merge: true));
The problem is that the code doesn't replace the already existing map, but just adds te keys to it.
This is the output of the code in the Firestore console: