to_array

The to_array filter will convert its input into a PHP array data structure.

{% my_object|to_array %}