I am working on a Azure Logic App that returns an empty array after using Filter function. In the next step, I would like to use a condition that can check if the previous array is empty or not. If the output is empty, Then it will return true and I will do something. So, what is the correct way to write the condition to check if the array is empty ?
Logic app designer view
Filter Array Step in advance mode: @startsWith(item()?['LastModified'], utcNow('yyyy-MM-dd'))
And it returns: []
How to write condition in the next step to check if the body or return value is equal to []
. Specially I am not being able to catch this empty array :(
Any help will be highly appreciated, thanks :)
You can refer to my Azure logic app
:
We need to use the length expression:
length(body('Filter_array'))
The result seems to be no problem:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With