Split out JSON array

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

image

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:

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

CleanShot 2024-05-31 at 11.41.14

1 Like

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:

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

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)

1 Like

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

image

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

what was the output of the previous node?

1 Like

Edit fields took this:

image

And made this out of it:

image

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

image

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

2 Likes

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