Inject Item
What It Does
Adds a single item into a list at a specific position. Unlike push which adds to the end, this allows you to insert an item anywhere in the list.
Inputs
| Name | Description | Type | Required |
|---|---|---|---|
| array | The original list | List | Yes |
| item | The item to insert into the list | Any | Yes |
| index | The position to insert the item at | Number | Yes |
Outputs
| Name | Description | Type |
|---|---|---|
| array | The list with the new item added | List |

How to Use It
- Drag the Inject Item node into your graph.
- Connect your list (like
[16, 24]) to the "array" input. - Connect the item to insert (like
15) to the "item" input. - Set the "index" value (e.g., 1 to insert between the first and second items).

Tips
- Use index 0 to insert at the beginning of the list.
- You can use negative indexes to count from the end (-1 inserts before the last item).
See Also
- Array Push: For adding items to the end of an array.
- Replace: For replacing existing items rather than inserting new ones.
Use Cases
- Color Palette Refinement: Insert a transitional color between existing shades at a specific position.
- Priority Insertion: Add a new high-priority item in the middle of an existing sequence.
- Layered Structure Design: Insert elements between existing layers in a design structure.