Replace Item
What It Does
Substitutes an item at a specific position in a list with a new item. The original list remains unchanged while a new list is created with the replacement.
Inputs
| Name | Description | Type | Required |
|---|---|---|---|
| array | The original list | List | Yes |
| item | The new item to put into the list | Any | Yes |
| index | The position to replace (starts at 0) | Number | Yes |
Outputs
| Name | Description | Type |
|---|---|---|
| array | The list with the replaced item | List |

How to Use It
- Drag the Replace Item node into your graph.
- Connect your list (like
[Red, Green, Blue]) to the "array" input. - Connect the replacement item (like
Yellow) to the "item" input. - Set the "index" value (e.g., 2 to replace the third item).

Tips
- Array indexes start at 0, so index 1 refers to the second item in the list.
- You can use negative indices to count from the end (-1 replaces the last item).
See Also
- Inject Item: For inserting new items without replacing existing ones.
- Remove Item: For removing items from a list without replacements.
Use Cases
- Color Palette Refinement: Replace a color in a palette with an improved version.
- Token Update: Swap out a specific design token in a collection with an updated value.
- Content Revision: Update specific items in a structured content list without changing the list structure.