private function narrowArray(array $array, string $key = null)
    {
        if ($key) {
            $key .= '--';
        }

        $result = [];

        foreach ($array as $index => $value) {
            if (is_array($value)) {
                $result = array_merge($result, $this->narrowArray($value, $key . $index));
            } else {
                $result[$key . $index] = $value;
            }
        }

        return $result;
    }