Answer the question
In order to leave comments, you need to log in
How to raise all elements in a hash one level up and remove that hash?
For example, there is such a hash:
{
"aaa"=>{"age"=>11},
"bbb"=>{
"age"=>11,
"child"=>{
"child_1"=>{"age"=>11},
"child_2"=>{"age"=>11}
}
},
"ccc"=>{"age"=>11}
}
{
"aaa"=>{"age"=>11},
"child_1"=>{"age"=>11},
"child_2"=>{"age"=>11},
"ccc"=>{"age"=>11}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question