$arr = json_decode('[
{
"name": "test1",
},
{
"name": "test2",
}
]', true);
foreach($arr as $item) {
echo $item['name'];
}
[
{
"name": "test1"
},
{
"name": "test2"
}
]
$arr = json_decode(' {"my_array": [
{
"name": "test1"
},
{
"name": "test2"
}
]}', true);