Skip to main content

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​

NameTypeDescription
listlistThe list to search.
valueanyThe value to look for. When Field is set, it is compared to that field on each object.
fieldstringWire this to choose the field at runtime instead of in the node.

Outputs​

NameTypeDescription
passanyThe searched value, if it was found.
failanyThe 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 Item compares 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.