or
and and
operators take two parameters and return a boolean result.not
flips a boolean from true to false, or vice versa.any
will return true
if there are any true
values in a array sequence, and all
will return true if all elements in an array are true.any_c(condition)
and all_c(condition)
are like any
and all
but they take a condition expression that is used against each element to determine if it's true
. Note: in jq
you can simply pass a condition to any
or all
and it simply works - yq
isn't that clever..yetselect
operator to filter particular nodes.yq e <exp> <file>
or
exampleand
exampleany
returns true if any boolean in a given array is trueany
returns false for an empty arrayany_c
returns true if any element in the array is true for the given condition.all
returns true if all booleans in a given array are trueall
returns true for an empty arrayall_c
returns true if all elements in the array are true for the given condition.