Skip to main content

List Filter

Runs on: Shared (backend or chatbox overlay).

Splits a list in two by a condition. Matching items go to Matching, the rest to Not Matching. Both are lists of the input's type, so you can chain more list nodes onto either, such as List Length, List Sort or List Take.

For lists of plain strings, numbers or booleans, the condition compares the value directly. For lists of custom or built-in objects, pick a Field to compare, or wire the field input to choose it at runtime.

Condition offers Equals and Not Equals always, plus Is Greater Than, Is At Least, Is Less Than and Is At Most for numbers, or Contains, Does Not Contain, Starts With and Ends With for text.

Inputs​

NameTypeDescription
listlistThe list to filter.
valueanyThe value to compare against. 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
resultlistItems that matched, in input order.
restlistItems that did not match, in input order.

Configuration​

  • Condition: The comparison to run. Defaults to Equals.
  • Case Sensitive: Text comparisons only. Off on new nodes.
  • Field: The field to compare in lists of objects. Whole Item compares entire objects.

Example​

A raffle list holds objects with username and tickets. Set Field to tickets, Condition to Is Greater Than and the value to 0 to drop anyone who spent all their tickets, then wire Matching into List Random Item to pick a winner. To keep only the zero-ticket entries instead, wire Not Matching onward.