I want to make the key value a floating point type when overwriting the map type in firestore with flutter/dart.
Possible with ".set" but not with ".update" How is it possible?
current output value(.update)
{"40"
{"0":{"aaa" : "aaa", "bbb" : "bbb"}},
{"5":{"ccc" : "ccc", "ddd" : "ddd"}}
}
Ideal output value(.set)
{"40.0":{"aaa" : "aaa", "bbb" : "bbb"},
{"40.5":{"ccc" : "ccc", "ddd" : "ddd"}
}
Below is the corresponding code.
final testRef = FirebaseFirestore.instance.collection("test").doc("test");
await testRef.update(
{
"40.0": {"aaa" : "aaa", "bbb" : "bbb"},
"40.5" : {"ccc" : "ccc", "ddd" : "ddd"},
}
);