convert all json decoded objects to array in php
<p>I have a JSON decoded object(see the picture):</p>

<p><a href="https://i.stack.imgur.com/TE7tv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TE7tv.png" alt="print screen from browser"></a></p>

<p>I want to convert whole object to array(also children object). When I do something like this</p>

<pre><code>$parent_object = (array)$parent_object;
</code></pre>

<p>It converts only parent object, children objects are still objects. Is there way to convert all objects to array at once, instead of using (array) every time?</p>