Help for this page

Select Code to Download


  1. or download this
    sub tree_data {
      my ( $old_data, $key_name, $next_group, @remaining_keys ) = @_;
    ...
    
      return \@new_data;
    }
    
  2. or download this
    my $input = [
      {
    ...
        'other_data' => '123456789',
      },
    ];
    
  3. or download this
    my $output = [
      {
    ...
        ],
      },
    ];
    
  4. 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'
    );