Hi Team,
is there a ready solution to convert an linear array of hashrefs
like this
[ {level => 0, value => "string1"},
{level => 1, value => "string2"},
{level => 2, value => "string3"},
{level => 2, value => "string4"}
]
into the nested data structure
[ {value => "string1",
kids => [
{value => "string2",
kids => [
{value => "string3"},
{value => "string4"}]}]}]
? Any pointer appreciated.
Cheers, Simon
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/