public function offsetExists($key) { $this->decode_response(); return is_array($this->decoded_response) ? isset($this->decoded_response[$key]) : isset($this->decoded_response->{$key}); }