Is `items` a variable that gets created between each node?

Just trying to understand how the items variable works. Am I correct in thinking that every node wraps up its results into an array called items. I notice in every code node, the items variable contains the results of previous nodes.

Also, I can access same data by looking in items and $("<previous-node-name>").all(). When should I use one over the other?

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:

hello @jtoh

items is a legacy syntax, that was there before the v1 release. It’s still working, but I would suggest using the correct syntax

2 Likes

Perfect, thank you for the clarification.

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