如何[visible_children:protected]数组键访问对象数组,如在php中

WC_Product_Variable Object
(
[children:protected] => Array
    (
        [0] => 326
    )

[visible_children:protected] => Array
    (
        [0] => 326
    )

[variation_attributes:protected] => Array
    (
        [pa_location] => Array
            (
                [0] => mumbai
            )

        [Offer] => Array
            (
                [0] => 30%
            )

    )

We print_r the above array but instead want to print this section

[variation_attributes:protected] => Array
    (
        [pa_location] => Array
            (
                [0] => mumbai
            )

        [Offer] => Array
            (
                [0] => 30%
            )

    )

Mumbai and 30% we use the for loop but it's not getting this value output as per we want.