Ruby on Rails get key by value from two dimensional array <p>I have a two dimensional array that looks like this:</p> <pre><code>TITLETYPE = [['Prof.', '4'], ['Dr.', '3'], ['Mrs.', '2'], ['Ms.', '1'], ['Mr.', '0']] </code></pre> <p>I need to get the key for value 1 for example (which should be 'Ms.') How should I go about doing that?</p>