Expression Values with Conditions

Hi Team,

How can i add if condition inside expressions value.
I want to retrieve a value checking is that node is different from null or “not found” then retrieve from another node.
In the below case i want to retrieve from specific node if it has value.
Is it possible?
Something like this.

if {{$node[“Merge”].json[“subject”]}}!=“not found”
return {{$node[“Merge”].json[“subject”]}}

if {{$node[“Merge1”].json[“subject”]}}!=“not found”
return {{$node[“Merge1”].json[“subject”]}}

Hey @hermanmaleiane, perhaps this helps? Conditional (ternary) operator - JavaScript | MDN :slight_smile:

Here’s an example:

1 Like