Guest User

Untitled

a guest
Jul 11th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. >> arr = [{"name" => "a", "apple"=>"fruit"}]
  2. => [{"name"=>"a", "apple"=>"fruit"}]
  3. >> Hash[*arr]
  4. => {"name"=>"a", "apple"=>"fruit"}
  5. >> a = Hash[*arr]
  6. => {"name"=>"a", "apple"=>"fruit"}
  7. >> a["name"]
  8. => "a"
  9. >>
Add Comment
Please, Sign In to add comment