Tools/Mapper/Mapper.php
public function flattenArrayByKey(array $data, $key)
    {
        $array = [];
        foreach ($data as $value) {
            if (is_array($value) && isset($value[$key])) {
                $array[] = $value[$key];
            }
        }

        return $array;
    }
public function flattenArrayByKey(array $data, $key)
    {
        $array = [];
        foreach ($data as $value) {
            if (is_array($value) && isset($value[$key])) {
                $array[] = $value[$key];
            }
        }

        return $array;
    }
public function flattenArrayByKey ( array $ data , $ key ) { $ array = [ ] ; foreach ( $ data as $ value ) { if ( is_array ( $ value ) && isset ( $ value [ $ key ] ) ) { $ array [ ] = $ value [ $ key ] ; } } return $ array ; }
Flatten an array by key.

@param array  $data The array to flatten
@param string $key  The common key

@return array
Flatten an array by key .