Conditionally show data based on collection data

Hi

I am creating a simple to do application. I have two collections in my app. One with categories and one with tasks, linked to a category.

In my listview I'm loading the tasks based on the categories. I pass the category to a component and then I get the linked tasks.

I also get the categories that don't have tasks. So I would like to do something like

When count of tasks linked to category > 0 then show the component.

How would I best do that?

2 replies