Getting Value from another Node

I was trying to be efficient in getting a value from an element in another Node via a Function Node, as follows:

return [{json: {id: $items("SplitInBatches3").data[0]}}]

Unfortunately, I can’t get this to work, whereas the following 3 step function works just fine:

data = $items("SplitInBatches3")

let temp = data[0]

return [{json: {id: temp}}]

Any idea to what I might be (obviously) overlooking?

Desktop App 1.3.0 on macOS

I think I’ve got it … after reading the Expressions / Methods docs again … Expressions | Docs

return [{json: {id: $evaluateExpression($node["SplitInBatches3"].json["ServiceRapporten"]["id"])}}]
1 Like