Make arrayWhere take a predicate function.