# Split out JSON array

**URL:** <https://community.n8n.io/t/split-out-json-array/47545>\
**Category:** Questions\
**Created:** [May 31, 2024, 8:57am UTC](https://community.n8n.io/t/split-out-json-array/47545 "2024-05-31T08:57:25Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![YetAnotherGerrit](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/yetanothergerrit/32/40065_2.png) [@YetAnotherGerrit](https://community.n8n.io/u/YetAnotherGerrit)\
**Post date:** [May 31, 2024, 8:57am UTC](https://community.n8n.io/t/split-out-json-array/47545/1 "2024-05-31T08:57:25Z")

</div>

## Information on your n8n setup

- **n8n version:** SaaS

I try to do stuff 3 times based on an array from a JSON-payload handed over to a webhook. From my current understanding, that’s what the “Split out”-node is for, but I get an error message I am not able to fix:

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/c/0/c0f73522d5c46e49214656e294ff5980ca101859.png)

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/7/b/7b6b36b3c99e54f48cd2d4a63bfa8d5571c0439b.png)

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/a/3/a3f3da0d0f55c5e3241e42629dcb6e0f0aa9c967.png)

---

<div class="post-metadata">

**Author:** ![n8n](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/n8n/32/196425_2.png) [@n8n](https://community.n8n.io/u/n8n)\
**Post date:** [May 31, 2024, 8:57am UTC](https://community.n8n.io/t/split-out-json-array/47545/2 "2024-05-31T08:57:26Z")

</div>

It looks like your topic is missing some important information. Could you provide the following if applicable.

- **n8n version:**
- **Database (default: SQLite):**
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):**
- **Running n8n via (Docker, npm, n8n cloud, desktop app):**
- **Operating system:**

---

<div class="post-metadata">

**Author:** ![aya](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/aya/32/194036_2.png) [@aya](https://community.n8n.io/u/aya)\
**Post date:** [May 31, 2024, 9:43am UTC](https://community.n8n.io/t/split-out-json-array/47545/3 "2024-05-31T09:43:47Z")

</div>

Welcome to the community @YetAnotherGerrit 🎉  
Maybe you could try using the option `Fixed` instead of `Expression` like this:

 ![CleanShot 2024-05-31 at 11.41.14](https://europe1.discourse-cdn.com/n8n/original/3X/3/0/3032f87795d3072f138c177c5c6f5c8bbba87ff3.png)

---

<div class="post-metadata">

**Author:** ![YetAnotherGerrit](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/yetanothergerrit/32/40065_2.png) [@YetAnotherGerrit](https://community.n8n.io/u/YetAnotherGerrit)\
**Post date:** [May 31, 2024, 10:30am UTC](https://community.n8n.io/t/split-out-json-array/47545/4 "2024-05-31T10:30:04Z")

</div>

Hey aya,

thank you for your assistance!

I tried `{{ $('Webhook').item.json.body.ticket.article_ids }}` as a value. But “no data”.

I also tried `$('Webhook').item.json.body.ticket.article_ids`, but still “no data”.

Only “body.ticket.article\_ids” will not work, as there are some conditional nodes before the “Split out”-node:

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/e/c/ec06c934feb9f9b47ca6e5fcc68b7eff24d0b800.png)

(I need to split out data from the `Webhook` node, after the `if` node and the `create: ticket` node have been executed.

---

<div class="post-metadata">

**Author:** ![barn4k](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/barn4k/32/8170_2.png) [@barn4k](https://community.n8n.io/u/barn4k)\
**Post date:** [May 31, 2024, 10:47am UTC](https://community.n8n.io/t/split-out-json-array/47545/5 "2024-05-31T10:47:40Z")

</div>

hello @YetAnotherGerrit

In that case your should return the webhook data again with the Edit Fields node and then you will be able to use the Split Out node (it works only with the fields from the previous node)

---

<div class="post-metadata">

**Author:** ![YetAnotherGerrit](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/yetanothergerrit/32/40065_2.png) [@YetAnotherGerrit](https://community.n8n.io/u/YetAnotherGerrit)\
**Post date:** [May 31, 2024, 10:59am UTC](https://community.n8n.io/t/split-out-json-array/47545/6 "2024-05-31T10:59:55Z")

</div>

Okay, the “edit fields”-node brought some progress. Thank you for the tipp.

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/b/a/ba31d223b68bf04495b9229b91c3b3ce4696c397.png)

But shouldn’t the “Split out”-node now output 3 items, instead of 1?

---

<div class="post-metadata">

**Author:** ![barn4k](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/barn4k/32/8170_2.png) [@barn4k](https://community.n8n.io/u/barn4k)\
**Post date:** [May 31, 2024, 11:01am UTC](https://community.n8n.io/t/split-out-json-array/47545/7 "2024-05-31T11:01:03Z")

</div>

what was the output of the previous node?

---

<div class="post-metadata">

**Author:** ![YetAnotherGerrit](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/yetanothergerrit/32/40065_2.png) [@YetAnotherGerrit](https://community.n8n.io/u/YetAnotherGerrit)\
**Post date:** [May 31, 2024, 11:58am UTC](https://community.n8n.io/t/split-out-json-array/47545/8 "2024-05-31T11:58:36Z")

</div>

`Edit fields` took this:

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/d/b/dbc21627dde5e270f1f9f26c9c80da05d6444d33.png)

And made this out of it:

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/e/9/e98e392a65030a085cacb95d2dd65896c72ae003.png)

And that is the input of the “Split out” now:

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/4/d/4d632d9958a35942cd1a759b9ffc0de0a47799b6.png)

EDIT: Just found the option in the `edit fields`-node to change the datatype form “string” to array. Thank you a ton!

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [July 15, 2024, 12:33pm UTC](https://community.n8n.io/t/split-out-json-array/47545/9 "2024-07-15T12:33:19Z")

</div>

Closed on July 15, 2024, 12:33pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
