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"}
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"}
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.
Please check below image: It's show different approaches to get the same result :D