Convert an array into an array of objects
Needs changesWhat this workflow does
This workflow has 2 nodes and runs from “Mock Data” (no trigger node, so run it manually or call it from another workflow). It uses only n8n's built-in nodes.
How it runs
Trigger: From “Mock Data” (no trigger node, so run it manually or call it from another workflow).
- Mock Data (Function): runs custom JavaScript (legacy Function node)
- Function: runs custom JavaScript (legacy Function node)
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- Function (legacy) in Mock Data, Function: replace with Code node, mode 'Run Once for All Items'.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
Published 2020 — 25% of templates published before 2025 need changes for 3.0. See how template age affects 3.0 readiness →
| Removed in 3.0 | Replace with |
|---|---|
| Function (legacy) Mock Data, Function | Code node, mode 'Run Once for All Items' |
Nodes used (1)
- Function
n8n-nodes-base.function
From the author
You can use the Function node to convert an array to an array of objects.