Getting error on splitting the the json elements

I have a workflow in which i get data from webhook extract it using extract node then according to the parameters given in the webhook i give it to the concerned workflow i use set node to get all the extracted data into a single json and when i use split node after it to spilt each json object it gives me this.getNodeParameter(…).split is not a function this error. Below is a snapshot of the data which is getting inputted and the error node. Please help on what am i doing wrong or some other way in which i can resolve this error. I am splitting this json elements for inserting them into my postgres database.

Debug info

core

  • n8nVersion: 1.110.1
  • platform: docker (self-hosted)
  • nodeJsVersion: 22.19.0
  • database: postgres
  • executionMode: regular
  • concurrency: -1
  • license: enterprise (production)

storage

  • success: all
  • error: all
  • progress: false
  • manual: true
  • binaryMode: filesystem

pruning

  • enabled: true
  • maxAge: 336 hours
  • maxCount: 10000 executions

Thanks for sharing the screenshot — I see exactly what’s happening.

The issue is: in your Split Out node, you are directly putting

{{ $json.products }}

But $json.products is already an array of objects, not a string.
The Split Out node expects either a string (to .split()) or an array path that it can iterate over. When you give it an array directly inside {{ }}, it’s interpreting it as a string function call and fails with split is not a function.

2 Likes

Oh ok got it. As per your point and explanation I directly placed the variable with out the curly braces like this and it worked

$json.products // without double curly braces in the field

Thank You, it really helped

1 Like

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