If it’s literally checking an empty array, then that wouldn’t work as that expression is trying to compare an empty array to an empty string which are not directly comparable.
- Empty Array:
[]
- Empty String:
''
I would probably recommend just using the isEmpty()
method if you want some flexibility in checking to see if the input data is ‘empty’. You can find it in the Content Checks section of the General Functions in Rule Expressions documentation.
The nice thing about this method is it covers a variety of ‘blank’ scenarios. It covers each of the following concepts.
- String that is null or
''
- Array with no items
[]
- Number that is
0
- Object property that is undefined
(or matches one of the above type comparisons)
Edit: There’s a few examples showing this in the following threads: