- or download this
sub tree_data {
my ( $old_data, $key_name, $next_group, @remaining_keys ) = @_;
...
return \@new_data;
}
- or download this
my $input = [
{
...
'other_data' => '123456789',
},
];
- or download this
my $output = [
{
...
],
},
];
- or download this
# ...to generate the output example from above...
my $output = tree_data( $input, 'team', 'employees' );
...
my $output = tree_data(
$input, 'team', 'employees', 'employee', 'work_days'
);