I want to use an OR operation to combine the following conditions:
- the count of my
arris not equal to0 - my
emaildoes not contain"test.com"
Currently I am using the built-in function any():
any([count(arr) != 0, not contains(email, "test.com")])
However my rule is producing an error.
How can I achieve and improve this in one line?
The
notkeyword is a bit of a special case in that it can't be used inside of many contexts such as the array of your example. I believe this could be improved in OPA, but until then you can trivially avoid it for at most cases, like the one you provided: