Remove Item
Last updated
Last updated
Removes a single item from a list at a specific position. It returns both the modified list and the item that was removed, making it useful for extracting elements or trimming collections.
array
The list to remove an item from
List
Yes
index
The position of the item to remove
Number
Yes
array
The list with the item removed
List
item
The item that was removed
Any
Drag the Remove Item node into your graph.
Connect a list (like [Red, Blue, Green]
) to the "array" input.
Connect a number (like 1
) to the "index" input to specify which position to remove.
Run the graph—your "array" output will be [Red, Green]
and your "item" output will be Blue
.
Indexes start at 0, so the first item is at position 0, the second at position 1, etc.
You can use negative indexes (-1 removes the last item, -2 the second-to-last, etc.).
Token Refinement: Remove specific tokens from a design system collection to create simplified subsets.
Data Processing: Extract a specific element from a data series for individual analysis.
Sequential Operations: Process items one-by-one by removing them from a working list as you handle them.
: For adding an item to a list.
: For removing multiple items based on conditions.