public static function pivotFromTwoDimension(&$array)
    {
        foreach ((array) $array as $val) {
            if (is_array($val) || is_object($val)) {
                foreach ((array) $val as $key => $val2) {
                    $array = Arr::set($array, $key, $val2);
                }
            }
        }

        return $array;
    }