I am trying to construct a map with object as keys and probably running to object instance related issues and would like to get some opinion here.
const x = new Map<{label: string, name: number}, string>();
x.set({label: 'x', name: 122}, 'r');
x.set({label: 'x', name: 122}, 'r1');
I can see that x is populated with two Object keys, while I am actually try to update the existing one and of course reads fail on this key as object.
My hunch is that keys are considered as two different object instances, is there a way for me to achieve this?