Upon upgrading to version 2.6.1, this no longer works.
JSON:
{
"predictions": [
{
"fields": [
"prediction",
"probability"
],
"values": [
[
"Accuracy",
[
0.1428571492433548,
0,
0.2857142984867096,
0,
0,
0,
0.285714253783226
]
]
]
}
]
}
JSONata Expression: $max(predictions.values[0][1])
JSONata Expression: $max(predictions[0].values[0][1])
In both case, this results in the error "com.api.jsonata4java.expressions.EvaluateException: Argument 1 of function "$max" must be an array of "number""
The same expression is correctly evaluated in try.jsonata.org to: 0.2857142984867