I cant get one value from object


I did API Request for THETA Camera with php language and that was working :

code :

  ini_set( 'display_errors','1');
  $url ="";
  $username = 'THETAYN10113693';
  $password = '10113693';
 // $parameters json_encode(array("fileType" => "image", "entryCount" => 1, "maxThumbSize" => 0));
  $Body = json_encode(array('name' => 'camera.listFiles', 'parameters' => array("fileType" => "image", "entryCount" => 1, "maxThumbSize" => 0)));
  $options = array(
          CURLOPT_URL            => $url,
          //CURLOPT_HEADER         => true,
          CURLOPT_VERBOSE        => true,
          CURLOPT_SSL_VERIFYPEER => false,    // for https
          CURLOPT_USERPWD        => $username . ":" . $password,
          CURLOPT_POST           => true,
          CURLOPT_HTTPHEADER     => array('Content-Type:application/json'),
          CURLOPT_POSTFIELDS     => $Body
  $ch = curl_init();
  curl_setopt_array( $ch, $options );
  $raw_response  = curl_exec( $ch );

 // echo json_encode($raw_response);  
 //$total_data = json_encode($raw_response);

echo $raw_response;
 //echo $total_data;

and i got this Response :


I want only one value from this object i want Url Picture To be able to download the image

but i cant got any single value from this object Always got only Undefine 

I tried also $raw_response.state._latestFileUrl also not work ??

I dont know how can I handle with this object???

i hope help

The response from the camera is JSON. I am not familiar with PHP. How do you convert JSON into PHP objects? Should you use json_decode instead of json_encode to convert a JSON string into a PHP data type?

From a quick web search, I see this.
PHP: json_decode - Manual

Here’s an example with Dart. If the HTTP response is 200, then I decode the JSON string into a Dart Object and then am able to extract the fileUrl.

      if (response.statusCode == 200) {
        var responseBody = jsonDecode(response.body);
        // thumbnail is base64 encoded
        var thumb64 = responseBody['results']['entries'][0]['thumbnail'];
        String fileUrl = responseBody['results']['entries'][0]['fileUrl'];
        String name = responseBody['results']['entries'][0]['name'];

I find that using this site helps with testing.

You can simulate image lists with this


i want way to handle this object in Php or in java Script normsl both is work

The response from the camera is a standard JSON string. Do you have code to convert a standard JSON string into PHP?

Can you extract the JSON values from another service like this?