PHP converte objeto para matar aninhado

$array = json_decode(json_encode($nested_object), true);
Innocent Ibis