Get map key for value

BlitzMax Forums/BlitzMax Programming/Get map key for value

slenkar(Posted 2008) [#1]
How would I get a map key if I had the value?


Brucey(Posted 2008) [#2]
Keep another map with the key/values reversed? (assuming of course that each key and value are unique)


Gabriel(Posted 2008) [#3]
Depending on your situation, it may make sense to have the key as a field within the object which is the value. It would make sense, for example, if the key was the name of the object. In other situations, it may not.