Check if an array is empty

I have a table user_list_data with two columns, user_id and portfolio. For instance:

user_id       | portfolio
1             | {1, 2, 3, 4}
2             | {2, 5, 6, 9}

In my LookML code, I make a join with this table. But I want to make this only if the user_id has items on the portfolio. Otherwise, the join should not be done.

So, I want a function like this:

{% if is_empty(user_list_data) %}

I searched in the Liquid documentation but didn't find a function that make this. Is there any function like len(array) > 0 or is_empty(array)? 

1 0 753
0 REPLIES 0
Top Labels in this Space
Top Solution Authors