Count items in array by value

I have a SC API that returns an array of IDs, is there an easy way to use data binding client-side to count the number of items of a value (matching the id of a repeat item)

Something like:
{{arrayofIDs.where(someID).count}}

Yes, you can easily do this using the where formatter and the count formatter:

Resulting code is something like:

{{serverconnect1.data.query1.where(`city`, 'Berlin', '==').count()}}
1 Like

Ah, I tried it with an Array (added to the page - rather than from SC for testing) and the Where option wasn’t available because its an array and not an object:

The item I need to interrogate is an array with no keys