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.
n8n's Function node efficiently transforms nested JSON arrays into individual items, boosting downstream processing speed and simplifying complex data workflows.
Free n8n workflow template ready to import
Just upload and configure
Tested and optimized
Complete setup guide
Try a prebuilt agent—white label friendly when you’d rather ship than reinvent the wheel.
Noem AI
White Label AI Chatbot
Thrive Desk
White Label AI Helpdesk
AnyChat
White Label Chat Widgets
Support Board
White Label 24/7 Helpdesk
NexuScale
AI 24/7 B2B Leads Agent
WriterZen
SEO Content Agent
Sendr
Personalised Lead Generation Agents
XInterview
White Label AI Interview & Hiring Agent
*Some partner links help keep these workflows free. We only recommend agents we’ve demoed and would trust with client work.
Click the "Download Workflow" button above to get the JSON file.
In your n8n instance, go to Workflows → Import and select the JSON file.
Set up your Function and other service credentials in n8n.
Activate the workflow and test it to ensure everything works correctly.
Personal Strategy Session
Book a one-on-one session with me to review your current systems and identify the automation opportunities that will actually move the needle for your business.
Join the Collective
A leading community of AI builders, automation pros, and vibe coders shipping fast with access to premium knowledge and deals in one place.
Join Now!stay up to date with the latest in generative AI building
Ready to transform your business?