Reputation: 25
in my meteor app I am trying to count the number of collection-items based on two fields, without success:
importantTilDatesCount: Entrys.findFromPublication('importantEntrys', { $and: [
{"importantType" : { true }},
{"importantDate" : {
$lt: new Date(new Date().setDate(new Date().getDate()+7))
}}
]
}).count(),
"Entrys" is no typo ;)
Upvotes: 1
Views: 52
Reputation: 25
Thanks, it was both. true
instead of { true }
, as well as not specifying $and
.
Upvotes: 0