Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >> arr = [{"name" => "a", "apple"=>"fruit"}]
- => [{"name"=>"a", "apple"=>"fruit"}]
- >> Hash[*arr]
- => {"name"=>"a", "apple"=>"fruit"}
- >> a = Hash[*arr]
- => {"name"=>"a", "apple"=>"fruit"}
- >> a["name"]
- => "a"
- >>
Add Comment
Please, Sign In to add comment