Check if parameter is present

I was trying to find out if the telegram trigger is present with the parameter {{$node[“Telegram Trigger”].data[“message”][“document”][“file_name”]}}

My first try was an IF node checking the regex for .* but that doesn’t seem to work.

What would be the best way to make sure this string exists?

As there is no lodash get functionality it would sadly have to be done the uglier way.
Here two examples with fake data that show how it would once return false and once true depending on if the property exists or not:

1 Like

Easier way is to check .hasOwnProperty in the IF node:

{{$node[“Telegram Trigger”].data[“message”][“document”].hasOwnProperty("file_name”)}}

returns true, if there is a file_name, and false, if there isn’t.