List Contains
Runs on: Shared (backend or chatbox overlay).
Checks whether a value is in a list. It routes to Pass if found and Fail if not, forwarding the searched value either way.
Strings, numbers and booleans compare directly, case-sensitive unless you turn off Case Sensitive. For lists of custom or built-in objects, match on a single Field, or compare whole objects by content (key order doesn't matter).
Inputs
| Name | Type | Description |
|---|---|---|
list | list | The list to search. |
value | any | The value to look for. When Field is set, it is compared to that field on each object. |
field | string | Wire this to choose the field at runtime instead of in the node. |
Outputs
| Name | Type | Description |
|---|---|---|
pass | any | The searched value, if it was found. |
fail | any | The searched value, if it was not found. |
Configuration
- Case Sensitive: Text comparisons only. Off on new nodes. Existing nodes stay case-sensitive until you change it.
- Field: The field to compare in lists of objects.
Whole Itemcompares entire objects.
Example
Keep a list of banned words. Extract each word from a chat message and run it through List Contains. On Pass, time out or delete the message. On Fail, let it through.