← Node guide
Utility

Filter List

Narrows, sorts and cuts a list an earlier step produced — in one step rather than three.

util.filter
The piece

Narrow, sort and cut a list an earlier step produced — the elements from a Dump UI, the lines from a Read Logs — in one step instead of three.

Reach for it when

  • A Dump UI returned a hundred elements and you want the four that are buttons.
  • Keeping only the error lines out of a log capture, newest first.
Filter List
Idle
In the bag

Every setting this block has. A field marked only when appears once you have chosen the mode above it — those are alternatives to each other, not extra things to fill in.

  • ListRequired
    starts at —

    A list field, e.g. {{ $Dump UI.json.elements }} or {{ $Read Logs.json.lines }}.

  • Look at
    starts at —

    Which property of each item to test, e.g. label or selector. Leave blank when the items are plain text (log lines).

  • Keep items where it
    starts at contains
    — keep everything —containsdoes not containis equal tois not equal tostarts withends withmatches (regex)is greater thanis less thanis emptyis not empty
  • Compared with
    starts at —

    only when Keep items where it = contains or does not contain or is equal to or is not equal to or starts with or ends with or matches (regex) or is greater than or is less than

  • Match upper/lower case
    starts at off

    only when Keep items where it = contains or does not contain or is equal to or is not equal to or starts with or ends with or matches (regex)

  • Sort by
    starts at —

    A property to order by (blank keeps the original order — which is usually meaningful).

  • Order
    starts at Ascending
    AscendingDescending
  • Keep at most
    starts at 0

    0 keeps everything that matched.

Build it
  1. Point at the list, and say what to look at

    Look at names a property of each item — label, selector. Leave it blank when the items are plain text, like log lines.

    Filter ListSettings
    ListRequired
    {{ $Dump UI.json.elements }}
    Look atBlank for plain text
    label
    Keep items where it
    contains
    Compared with
    Add to cart
  2. Keep what matches

    elements · 24 items
    • Search
    • Add to cart
    • Product image
    • Add to cart · size L
    • Footer
    kept · 2
    • Add to cart
    • Add to cart · size L
  3. Then sort and cut, if you need to

    Blank Sort by keeps the original order — which for a UI dump is reading order and usually meaningful. Keep at most 0 keeps everything that matched.

    Filter ListSettings
    Sort byBlank keeps reading order
    —
    Order
    Ascending
    Keep at most0 = everything
    0
What comes out
  • The items that survived, and how many there were.
Watch out
  • Sorting a UI dump throws away reading order, which is often the information you actually wanted.
  • “— keep everything —” is a real choice: use it when you only want the sort and the cut.
Usually next to