protected function get($data, string $key)
    {
        $dot = $data instanceof Dot ? $data : new Dot($data);

        if (isset($dot[$key])) {
            return $dot[$key];
        }

        throw new UnexpectedResponseException(sprintf('Missing key \'%s\' in data'));
    }