如何访问此API返回值

时间:2019-05-25 14:03:49

标签: php arrays object

能帮我吗?我需要知道如何使用PHP通过API调用访问此响应的值。

Array([queryIds] => Array([0] => lHLLapn7EH)[timedOutRealtimeData] => [realtimeDataMissing] => [cacheFreshness] => FRESH [prunedResult] => [novaCost] => 0 [novaRequestDuration] = > 19 [wasCached] => 1 [minSampleRate] => 1 [timeComputed] => 1558794556710 [novaRuntime] => 199 [hitChunkGroupByLimit] => [throttleTime] => 0 [data] => Array([series] => Array ([0] =>数组([0] =>数组([setId] => [value] => 843)))[1] => Array([0] => Array([setId] => [value] => 22)))[seriesLabels] =>数组([0] =>数组([0] => 0 [1] => C5241; GB)[1] =>数组([0] => 0 [1 ] => C9999; GB))[seriesMeta] =>数组([0] =>数组([eventGroupBys] =>数组([0] => C5241 [1] => GB)[segmentIndex] => 0 [eventIndex ] => 0 [eventGroupBy] => C5241; GB)[1] =>数组([eventGroupBys] =>数组([0] => C9999 [1] => GB)[segmentIndex] => 0 [eventIndex] = > 0 [eventGroupBy] => C9999; GB))[seriesCollapsed] =>数组([0] =>数组([0] =>数组([setId] => [value] => 843))[1] = >阵列([0] =>数组([setId] => [value] => 22)))[xValues] =>数组([0] => 2019-05-25))[partialMergedAndNewUserInformation] => [transformationIds] = >数组([0] => 2696)[后端] => novaV2)

1 个答案:

答案 0 :(得分:1)

您可以使用

访问它们
 Array ( [0] => C9999 [1] => GB )  -> $arr['data']['seriesMeta'][0]['eventGroupBys']

Array ( [setId] => [value] => 20) -> $arr['data']['seriesMeta'][0][0]