How to show total of an item if it doesn't match certain criteria?

I've got a javascript transformer called "dataVars" that returns a query. I'm trying to use this data within a text component.

I'd like to show the total number of maintenance_status items if NOT "Complete".
So, basically I want the text to say "This ticket has 2 remaining tasks."

I tried sum but that just shows the names of each maintenance_status. I know i also need a conditional to != Complete, just not sure how, or if I'm going about this the right way for what I want.


Hello @dru_nasty

See if this works.

#### This ticket has {{dataVars.value.maintenance_status.filter(status=>status!=='Complete').length}} remaining tasks.

Exactly what was needed, thank you!
Though my javascript needs some brushing up on, this opens a lot of doors for me.