Skip to content
Advertisement

Trying to get value from a non Object response in php

I would like to get the Instance ID of last entered company name in Veeam and save it in my database

im using Curl for the APi at Rest .

The below code gets the response and decodes it

JavaScript

the response if below

JavaScript

is there a method were i can get the instanceUid of last entered company ?

Advertisement

Answer

Get the last entry of data and then the instanceUid:

JavaScript

But you shouldn’t be getting Trying to get value from a non Object anywhere unless you’ve tried to access something as an object like $json_output->data; which won’t work because you’ve decoded to an array with true passed to json_encode.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement