See the ok2 condition below. Please let me know if you agree.
const condition = {
stringEquals: {
forAnyValueIfExists: {
foo: ['bar', 'baz', 'boo']
}
}
};
const ok = {
foo: ['bar', 'booz', undefined] // This will pass because bar is an accepted value
};
const ok2 = {
foo: undefined // This should pass for the same logic as simpleValueIfExists. Currently, this doesn't pass
};
In the use case I have, sometimes the env has a groupId that needs to be matched against a list of IDs to see if it matches any of them. Sometimes the env doesn't have this groupId attribute and it should allow (condition match) in this case.