This topic was automatically generated from Slack. You can find the original thread here.
I’m doing a lot of stuff with pipedream but today I’m stuck on a simple filter action:
Action: Continue execution if a condition Is met
Version: 0.0.2
Condition: [Object] Key exists and is not null or undefined
Initial Value: {{steps.query_database.$return_value.results[0].id}}
Second Value?!? Whats that for if I want to check if the key exists? I don’t get it
Ahh…ok…thank you…I understand…a little So, I tried to give the object as 2nd: {{steps.query_database.$return_value.results}}
and the attribute as 1st: {{steps.query_database.$return_value.results[0].id}}
I tried it so and vice versa, but It didn’t work. Do you have any example for this filter?
The 2nd argument should be the property name not the property value.
When you enter in {{steps.query_database.$return_value.results[0].id}} the double brackets ({{ }}) instruct Pipedream to evaluate that JavaScript statement.
If you simply enter in the attribute name of id then you might have better luck.
Additionally, it looks like you’re accessing results[0].id, which means results is an array of objects, not a single object.
If that’s the case, it sounds like you might be reaching for the wrong filter, because the array could be empty and not contain any objects.