In Perl, from the below hash:
{
'item3' => {
'floors' => [ 'a', 'b', 'c' ]
},
'item1' => [ 'special' ]
'item2' => {
'books' => {
'topics' => [ 'epics' ]
},
'sports' => [ 'tennis' ]
},
'item5' => {
'groups' => {
'teams' => [ 'x', 'y' ]
}
},
'offers' => {
'list' => [ 'bags' ]
}
}
Need to parse only last values in each sub level of hash where it is always be an array.
Only final child entries(array values) need to be listed.
Expecting the output in one single array:
[ 'a', 'b', 'c', 'special', 'epics', 'tennis', 'x', 'y', 'bags' ]
no idea how to proceed....please help me to get rid of this.
Advance Thanks!!!!