I am trying to read json provide by google drive api, but not able to read json.
i am trying to read modelData:protected data.
I got following result under $result
[0] => Google_Service_Drive_DriveFile Object (
    [modelData:protected] => Array
            (
                [labels] => Array
                    (
                        [starred] => 
                        [hidden] => 
                        [trashed] => 
                        [restricted] => 
                        [viewed] => 
                    )
                [parents] => Array
                    (
                        [0] => Array
                            (
                                [kind] => drive#parentReference
                                [id] => 0B4tddddcc03RW42UTdjUlY3SDg
                                [selfLink] => 
                                [parentLink] =>
                                [isRoot] => 
                            )
                    )
         )
)
and i am trying to read parents[0]
And i write this code
foreach ($result as $res) {
print_r($res[modelData:protected]); 
}
This gives me error
Parse error: syntax error, unexpected ':', expecting ']' in
Any idea? how to resolve this issue
 
    