private function shouldShowKey($key)
    {
        if ($this->key) {
            if (Str::contains($key, '.') && Str::startsWith($key, $this->key)) {
                return true;
            }

            if (! $this->option('close') && $key != $this->key) {
                return false;
            }

            if ($this->option('close') && ! Str::contains($key, $this->key)) {
                return false;
            }
        }

        return true;
    }