-
-
Save anonymous/395ba703a4bf29ad660d to your computer and use it in GitHub Desktop.
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
# Pastebin bKmPxVww | |
data = [{'x'=>1}, {'x'=>2},{'x'=>'foo'}] | |
data.map{|h| OpenStruct.new(h)}.map(&:x) | |
# => [1, 2, "foo"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment