How-to · Lists
Keep only the list items that match a condition
Softanza
Q([ 1, 2, 3, 4, 5, 6 ]).FilterQ('{ @item > 3 }').Content()
#--> [ 4, 5, 6 ]Output
4 5 6
ran: printed what the recipe promises
run on 2026-10-02 22:33 inside the library at commit 0e72e2e2c; the expression carrying the promise was printed for the run · The recipe on GitHub(opens in a new tab)
The condition is a small engine-evaluated expression where @item is each element.
The methods
See also
Words for this task: filter, keep where, select, subset, matching items, pick out, retain

