src/Component/Json.php
/**
     * Converts all objects inside a value (if exists) to arrays, recursively.
     *
     * @param mixed $value
     * @return mixed
     * @see https://stackoverflow.com/a/54131002/4215651 Thanks to this.
     */
Converts all objects inside a value (if exists) to arrays, recursively.
Converts all objects inside a value ( if exists ) to arrays recursively .
protected function normalize($value)
    {
        if (is_object($value) || is_array($value)) {
            foreach ((array)($value) as &$item) {
                $item = $this->normalize($item);
            }
        }
        return $value;
    }
protected function normalize ( $ value ) { if ( is_object ( $ value ) || is_array ( $ value ) ) { foreach ( ( array ) ( $ value ) as & $ item ) { $ item = $ this -> normalize ( $ item ) ; } } return $ value ; }
Converts all objects inside a value (if exists) to arrays, recursively.
Converts all objects inside a value ( if exists ) to arrays recursively .
// Recursion