Function

Restructure JSON Array Elements into Individual Items

n8n's Function node efficiently transforms nested JSON arrays into individual items, boosting downstream processing speed and simplifying complex data workflows.

Function
Manual Trigger

This n8n workflow demonstrates how to restructure data, specifically by transforming an array of strings contained within a single JSON item into multiple individual JSON items. The process begins with a 'Mock Data' Function node that generates a sample input: a single item whose `json` property holds an array of strings like `["item-1", "item-2", ...]`. The subsequent 'Function' node then processes this input. It iterates through each string in the input array. For every string, it creates a new, separate output item. Each new item's `json` property will contain an object with a `data` key, holding one of the original strings. This effectively "flattens" the array, making each original string available as an independent, structured data item for downstream processing in other n8n nodes. This pattern is useful when an API or previous node returns a consolidated array that needs to be broken down for individual operations.

2
Nodes
1
Services
2
Categories
Manual
Type

Get This Workflow

Free n8n workflow template ready to import

Share on social

📄 File Details

1123_Automate.json
Automate
09/04/2025
Ready to Import

Just upload and configure

🔧
Production Ready

Tested and optimized

📚
Documentation

Complete setup guide

n8n's Function node efficiently transforms nested JSON arrays into individual items, boosting downstream processing speed and simplifying complex data workflows.

Loading visualization...
Loading target audience...
Loading security notes...
Loading compatibility...

Services & Integrations

Function
Loading FAQ...

How to Use This Workflow

1

Download the Workflow

Click the "Download Workflow" button above to get the JSON file.

2

Import to n8n

In your n8n instance, go to Workflows → Import and select the JSON file.

3

Configure Credentials

Set up your Function and other service credentials in n8n.

4

Activate & Test

Activate the workflow and test it to ensure everything works correctly.

Tags

#automate
#function
#manual
#automate
#workflow-automation
Loading checklist...

Related Workflows

Ready to transform your business?