Wordpress不显示API数据

I'm calling on an API using Wordpress (widget).

But for some reason, it's not letting me display nested objects like so:

private function get_request($username) {
        $url = wp_remote_get("https://api.github.com/users/essxiv/repos");
        $response = json_decode(stripslashes($url['body']));

        $nested_objs = $response[0]['id'];

        print_r($nested_objs);
}

I've also tried to print_r($response[0]['username']);

Everytime I tried to load my localhost Wordpress, it gives me a different looking UI, with NO Admin Header and the border of the page is orange and not black..

I'm just stumped and really need to display these nested object's data.

What am I doing wrong? How do I get the data printed?

Solution:

Apparently PHP does it a little differently:

private function get_request($username) {
        $url = wp_remote_get("https://api.github.com/users/essxiv/repos");
        $response = json_decode(stripslashes($url['body']));

        $name = $response[0]->{'name'};
        $id = $response[0]->{'id'};
        $owner = $response[0]->{'owner'};

        print_r($name);
        print_r($id);
        print_r($owner);

}

If you want to find a nested object key/value it would look something like this:

$owner = $response[0]->{'owner'}->{'login'};

Use a foreach loop..

function get_request($username='') {
                $url = wp_remote_get("https://api.github.com/users/essxiv/repos");

                $response = json_decode(stripslashes($url['body']));
                        foreach ($response as $key => $value) {
                            echo $value->id;
                            // $value->login;
                            // $value->avatar_url;
                        }


}