Can't Access Second Item In Expression

Describe the problem/error/question

I have 2 edit/set nodes 1 outputs json that contains an array of sms threads. The other outputs a number which is supposed to be used to choose what index of the sms threads should be used in proceeding steps. I then merge these using the merge node.

i then intend pass the merge node output to another edit/set where i intend to use execute some logic based on values of both of the merged items. But when making an expression it seems like i only have access to the first item of the merge node.

so i can access {{ $json.threads[0]}}

but i can’t access {{ $json.forceThread}}

why is this? how can i access each item of a merge node from an expression.

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • **n8n version:**1.95.2
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • **Running n8n via (Docker, npm, n8n cloud, desktop app):**n8n cloud
  • **Operating system:**win 11

hello @joshkasaptriosoft

switch the Merge Operation to “Combine >> by Position”

1 Like

That worked, ty

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