I have a map with an object as a key. For example: {date:"01/01/1990", idActiv:"4"}.
Then as a value, I have a string ("T" or "F") that represents True or False. My goal is to update that value, given a key.
var mapElem = new Map();
mapElem.set({date: "08/06/2020", idActiv: "1"}, "T");
mapElem.set({date: "18/06/2020", idActiv: "3"}, "T");
How I can update the map with object key {date: "08/06/2020", idActiv: "1"}?
If I do this:
mapElem.set({date: "08/06/2020", idActiv: "1"},"F");
I will have keyes repeated (Mozilla Firefox console):
mapElem.set({date: "08/06/2020", idActiv: "1"},"F");
Map(3)
size: 3
<entries>
0: Object { date: "08/06/2020", idActiv: "1" } → "T"
1: Object { date: "18/06/2020", idActiv: "3" } → "T"
2: Object { date: "08/06/2020", idActiv: "1" } → "F"