when I make a request with Guzzle:
$response = json_decode($client->get($uri)->getBody()->getContents());
var_dump($response); die;
I get this in var_dump:
stdClass (object) [Object ID #2395][3 properties]
contacts:
(array) [250 elements]
has-more: (boolean) true
vid-offset: (integer) 111259
When I make $response->contacts
I get all contacts, no problem there but this vid-offset
has a -
in it's name so this doesn't work:
$response->vid-offset
and I tried this also:
$response['vid-offset'];
And I get this error: Cannot use object of type stdClass as array
I've also tried doing :
$response->getAttribute('vid-offset')
But it still didn't work.
How to get the value of vid-offset
property?