Skip to main content

List

19 commands. Toolkit id ooa.list.

CommandWhat it does
Add itemAdd an item at the end, or at a position.
Append listJoin two lists into one, the second after the first.
ClearReturn an empty list; map it back to the variable to empty it.
FilterKeep the items that pass a test, such as greater than 100 or contains Acme; for a list of records, test one field.
Find itemReturn the zero-based position of the first (or last) item equal to a value.
Get itemRead the item at a position.
Get sizeNumber of items.
Items in both listsReturn the items of the first list that are also in the second, in the first list's order, each once.
Items not in other listReturn the items of the first list that are not in the second, e.g. invoices not yet processed.
JoinJoin items into one text with a separator.
List contains itemTrue when the list contains the value.
List is emptyTrue when the list has no items.
Remove duplicatesKeep the first occurrence of each value.
Remove itemRemove the item at a position, or every item equal to a value.
ReverseReturn the items in reverse order.
Select fieldTurn a list of records (dictionaries) into a list of one field's values, e.g. the e-mail of every customer.
Set itemReplace the item at a position.
ShuffleReturn the items in a random order, e.g. to pick a random sample.
SortSort items (numbers numerically, text alphabetically).