I am trying to find the max() for the below json string using JsonPath, but it throws an error Aggregation function attempted to calculate value using empty array
. Please let know what will be correct JsonPath to get the max value.
[
{"question":"pattern1","time":1},
{"question":"pattern2","time":5},
{"question":"pattern2","time":4}
]
$..time -- returns [1,5,4]
$..time.max() -- throws an error