我正在尝试使用JsonPath为下面的json字符串找到max(),但它会引发错误Aggregation function attempted to calculate value using empty array
。请知道什么是正确的JsonPath以获得最大值。
[
{"question":"pattern1","time":1},
{"question":"pattern2","time":5},
{"question":"pattern2","time":4}
]
$..time -- returns [1,5,4]
$..time.max() -- throws an error