We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
Sorry maybe my brain still thinks the other way but how would you solve this problem: bazaarvoice/jolt#700
I cant think of a way without having to create custom recursive max\min as in:
def max_array(array)
if(size($array)==0) null else if(size($array)==1) $array[0]
else max($array[0],max_array($array[1:]))
vs
{
"minPrice": min([for(.prices).price]) "minPrice": max([for(.prices).price])
}
Thanks
The text was updated successfully, but these errors were encountered:
You're right that there is no other way at the moment. max() and min() should perhaps also have single-argument versions that accept an array.
max()
min()
Sorry, something went wrong.
min
max
Successfully merging a pull request may close this issue.
Hi,
Sorry maybe my brain still thinks the other way but how would you solve this problem:
bazaarvoice/jolt#700
I cant think of a way without having to create custom recursive max\min as in:
def max_array(array)
if(size($array)==0)
null
else if(size($array)==1)
$array[0]
else max($array[0],max_array($array[1:]))
vs
{
"minPrice": min([for(.prices).price])
"minPrice": max([for(.prices).price])
}
Thanks
The text was updated successfully, but these errors were encountered: