Say I am storing the currentMin
each iteration like this in a Map
StoreCurrentMin.set(StoreIandJ[counter],currentMin);
where StoreIandJ[counter]
is an array , which is used as key and changes on iterations.
Later I am doing this
var values_array = Array.from( StoreCurrentMin.values() );
which forms an array of all values in the map.
Now my questions is , the value in this map can be duplicates , say they are 2,3,4,2,2
how would I get back keys for all instances of 2