Question: When i `dd($MyArray);`

I have a response like in the image 
[![enter image description here](https://i.stack.imgur.com/Qf8gb.png)](https://i.stack.imgur.com/Qf8gb.png)

I'm asking why this code not working ? 

```
$Id = $MyArray->id;

```

Error : Trying to get property 'id' of non-object

Answer: 
It is associative array. You access properties like: $MyArray['id']
You can't access array element by `->`

```
 $MyArray['id'];

```

Or just convert array to object by

```
 $newObject = (object)$MyArray;
 $newObject->id;

```