How to pick out elements from a stdClass array

151 Views Asked by At
array (0 => stdClass::__set_state(array(
 'information' => 
stdClass::__set_state(array(
   'url' => 'https://www.website.com/in/thing-again-3424/',
   'email' => NULL,
   'picture' => 'https://234324.234324.com/mpr/mpr/shrinknp_400_400/234234.jpg',
   'fullname' => 'James Smith',
   'headline' => 'Senior',
   'company' => 'Boots Ltd',
   'school' => 'Fake University',
   'location' => 'Fake, United Kingdom',
   'summary' => 'Did some stuff',
   'emailScore' => 0,
)),
 'experiences' => 
array (
  0 => 
  stdClass::__set_state(array(
     'href' => '/thebest/numbers/',
     'role' => 'Programmer',
     'companyName' => 'Boots Ltd',
     'dateRange' => 'Mar 2017 – Present',
     'location' => 'london',

This data was an object in my js and it was passed to my php server as a form, I have decoded it with $data = json_decode($request->profile);

The above structure is what it has come out as

My question is how i would grab a single element, such as picture Something along the lines of

$data->information->picture

Reminder, this is on laravel.

0

There are 0 best solutions below