Reputation: 195
Let's say I've got hash like this:
{"290"=>{"id"=>"290", "name"=>"Test Number", "order"=>"2"}}
I want to to have:
{"id"=>"290", "name"=>"Test Number", "order"=>"2"}
Upvotes: 0
Views: 516
Reputation: 4251
Please check below image: It's show different approaches to get the same result :D
Upvotes: 0
Reputation: 70929
Let's say h = {"290"=>{"id"=>"290", "name"=>"Test Number", "order"=>"2"}}
. Now you can do h = h["290"]
and you will have what you want.
Upvotes: 1