array->contains
Tests array membership.
Target
Signature
1array->contains(matching)Tests array membership.
array->contains is called with member syntax on a receiver value. array->contains is useful when moving through groups of values. Prefer collection operations that match the shape of the data rather than converting everything to strings.
Parameters
matching- Required value. Supply
matchingpositionally unless the signature shows a keyword form.
Examples
Basic call
1array('a','b')->contains('b')The example shows the normal call shape. Adapt variable names, validation, and surrounding error handling to the context.