Skip to content

Condition based on an array field 'includes' #1313

Answered by rvsia
logancameo asked this question in Need help
Discussion options

You must be logged in to vote

@logancameo

Hello,

there is no schema based attribute to support that, but you can achieve the same result using custom is function.

Read more here

condition: {
  when: 'Foo',
  is: (value) => value?.includes('foo')
}

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@rvsia
Comment options

@logancameo
Comment options

Answer selected by rvsia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants