2015-12-30 87 views
0

我得到這個對象數組作爲來自temboo fitbit api的響應。這是print_r($result)輸出:如何訪問來自PHP對象數組的數據

Fitbit_Statistics_GetTimeSeriesByDateRange_Results Object ([outputArray:protected] => Array ([Response] => {"activities-log-steps":[{"dateTime":"2015-12-30","value":"129"}]}) [lowercaseKeyMap:protected] => Array ([response] => Response)) 

如何訪問該對象的屬性value

+1

好了,這是'protected',有一個'GET'方法?另外,你嘗試過什麼? – FirstOne

+1

我發現temboo有獲取json的方法:getTimeSeriesByDateRangeResults-> getResponse() – user2570937

回答

1

我發現temboo有方法來訪問結果:

getTimeSeriesByDateRangeResults->getResponse() 
+1

+1 https://github.com/temboo/php-examples/blob/master/FacebookMealsApp/php-sdk/src/library/temboo .fitbit.php#L3368 –