If I have a array formatted as below
[
{
'id':1,
'some_int': 3,
'foo':'bar'
}
]
How can I retrieve, for example, 'bar' value?
If I write
$array[0]['bar']
It throws Cannot use object of type stdClass as array
If I write
$array['bar']
It throws Unidentified index: bar