How to print the second copy of json_decode?

this is the json result of my json_decode counterpart returning to me

stdClass Object
(
    [attributes] => Array
        (
            [0] => stdClass Object
                (
                    [attribute-id] => 5c6186217d4d0765152e42f7
                    [attribute-type] => skill
                    [parent-attribute-id] => 
                    [parent-attribute-name] => 
                    [name] => rgargrereshserhersh
                    [slogan] => srehsrehrsehsrehre
                    [description] => hrehrehresserhgserhserh
                    [time-created] => 2019-02-11T14:54:57.073Z
                    [available] => 1
                    [time-available] => 2019-02-11T14:26:41.348Z
                    [image-path] => http://127.0.0.1:9002/images/attribute/icon/15498952015c61862103aea-icon.JPG
                    [cover-path] => http://127.0.0.1:9002/images/attribute/cover/15498952015c61862103aea-cover.jpg
                )

        )

)

how do I print name?
he first has "attributes"
what I originally did was

<?=$data->{"name"};?>

but I can"t. With the addition of "attributes" in the first one, how can I print the KEY in the second one?
PS: there will be only one session, so foreach will not be used


json_decode (xxx, true )

official document json_decode

assoc
when this parameter is TRUE, array is returned instead of object.


or json_decode becomes array:

  

json_decode ($data,true) can be converted into an array

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-7b905d-159cc.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-7b905d-159cc.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?