Generally if you have two-way data that you need to access, you either have two maps if a key could be the same as a value, otherwise just a single map.
When you add something to one of these maps, make sure to add it to the other, with the keys/values swapped.
const dict1 = new Map([
['a', '1'],
['b', '2']
]);
// automatically make the second, inverted map
const dict2 = new Map([...dict1.entries()].map(([k, v]) => [v, k]));
console.log(dict2.get('1'));
If you wanted to, you could also make your own class that uses Maps under the hood to make the interface easier to work with.