protected function filter(array $array)
    {
        $config = collect(array_dot($array))->map(function ($value, $key) {
            if (str_contains($key, $this->hidden)) {
                return '';
            }

            if (in_array($key, $this->boolean)) {
                return (bool) $value;
            }

            return $value;
        });

        $array = [];
        foreach ($config as $key => $value) {
            array_set($array, $key, $value);
        }

        return $array;
    }