Get dictionary key by value

Values do not necessarily have to be unique, so you have to do a lookup. You can do something like this: If values are unique and are inserted less frequently than read, then create an inverse dictionary where values are keys and keys are values.