Lets have a following dict:
table = {x1: {y1: 1, y2:2},
x2: {y1: 3, y2:4},
x3: {y3: 5, y2:6}
}
Considering the values are unique, is there any way to query the key path based on the value efficiently or it is better to reconstruct the dict using the value as the key?
Example:
result = magic_function(table, 3)
result --> [x2, y1]
Thanks,