使用多个 stdClass 对象从深度关联数组中提取值

Extract value from deep associative array with multiple stdClass Object

我正在尝试从一个极其复杂的关联数组中访问一个值:

stdClass Object
(
    [return] => Array
        (
            [0] => stdClass Object
                (
                    [entries] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [key] => LAUNCH_DATE
                                    [value] => 2016/07/20
                                )

                            [1] => stdClass Object
                                (
                                    [key] => COUNTRIES
                                    [value] => AU
                                )

我试过这个来获取值 'AU' 但不幸的是没有运气:

$test = $array_store->return->entries->1->value;
echo $test;

这很难,我很挣扎。我设法从一个更简单的数组中提取出来,但是这个太深了。请帮助 - 努力学习。

试试看:

$test = $array_store->return[0]->entries[1]->value;
echo $test;