Created
November 22, 2013 19:31
-
-
Save jdewind/7605495 to your computer and use it in GitHub Desktop.
Terse approach to mapping a Hash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hash[query.map { |k,v| [k, [v].flatten[0]] }] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment