Cannot get data from previous Code nodes


Node Code3 can only get 1 data from node Code6 and node Code2
Meanwhile, node Code2 has output 2 items, node Code6 has output 25 items
I don’t know where the error is, please support me, thank you

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:

Please include your entire workflow.

hey can you check , my question too please?


Running n8n cloud
Version [email protected]

Please don’t use other topics for that.

@Thu_Tran please post the JSON, not a screenshot.

I send you:
https://leett.app.n8n.cloud/workflow/NtOP0MsbFxiE80iz

please, help me
my workflow: n8n.io - Workflow Automation

We can’t access your workflow like that, please copy/paste it here by clicking the </> icon at the top of the message editor.

How about using $(“Code6”).json instead?

$node is deprecated, and it’s suggested that you do not use it.

- Milan, Consultant @ Automable.ai

1 Like

please, help me

please, help me

hello @Thu_Tran

Refer to the previous Code node outputs with $('nodename').all().map(x => x.json), e.g.

let data2 = $('Code2').all().map(x => x.json)
let data6 = $('Code6').all().map(x => x.json)

then data2 and data6 will be arrays of items for each corresponding node.

1 Like

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