When I just input {{$json}} as an expression, it seems to show an object in [] that doesn’t contain the second part of that array. I’ve tried array notation like {{ $json[1].code }}, but that is undefined also.
Running n8n via (Docker, npm, n8n cloud, desktop app):
Operating system:
Could you also share your workflow with us? Additionally, if you use the $("<node-name>") syntax in the expression editor, does this help you select the value?
I’m using n8n cloud with all the default settings and version 1.0.5. I’m on MacOS.
I think I have a fundamental question about n8n. Am I supposed to be able to get data from any previous node in later nodes? For example, can I get data using the $("<node-name>") syntax from, say, node 2 in node 7? Are there any limits to this?
I believe I sorted out the issue above though. After MANY attempts, I eventually came up with something like this {{ $('Merge').all()[0].json.properties.email.value }}. The .all()[0] was the key thing. I wasn’t aware of the all expression and that that’s where I could target a specific object in the array.
Hi @jmr123 You should be able to get data from Node 2 and use it in Node 7 as per your example with that syntax And thanks so much for posting your solution to this, too
because if your previous node send in more than one item, this would use the data for the first item 3 times instead of the specific data for each item pulled from checkIf.
This was a massive amount of frustration for me, but figured it out and hope this saves someone’s day in the future.