G
Glenn Ritz
Hi,
I would like to take a nested hash that looks like this:
{"a"=>{"b"=>{"c"=>1}, "b2"=>{"c2"=>2}}}
and turn it into an array of 2 element arrays like this:
[["a: b2: c2: ", 2], ["a: b: c: ", 1]]
Is there a simple way to do this? I wrote a method that iterates
through the nested hashes recursively, but it's a bit cumbersome.
I would like to take a nested hash that looks like this:
{"a"=>{"b"=>{"c"=>1}, "b2"=>{"c2"=>2}}}
and turn it into an array of 2 element arrays like this:
[["a: b2: c2: ", 2], ["a: b: c: ", 1]]
Is there a simple way to do this? I wrote a method that iterates
through the nested hashes recursively, but it's a bit cumbersome.