从对象获取值

My query is return a stdclass of objects

How i can get value of - affected_rows -

    Object (
    [affected_rows] => 0  
    [connect_errno] => 0 
    [connect_error] => [errno] => 0 
    [error] => [error_list] => Array ( ) [field_count] => 0
    [host_info] => localhost 
    [stat] => Uptime: 261195 Threads: 5 Questions: 14167 Slow queries: 0 
Opens: 2969 Flush tables: 1 Open tables: 191 Queries per second avg: 0.054 
   [thread_id] => 1593 [warning_count] 
=> 0 ) [result:protected] => mysqli

i tried pass the objects as a array but dont works

thanks

Properties of object are accessed with ->

var_dump($object->affected_rows);