daily pastebin goal
28%
SHARE
TWEET

Untitled

a guest Jul 11th, 2018 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. >>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top