How to use $min mongo query in Meteor.js?

2019-09-06 20:57发布

I'm basically trying to create a filter that only displays accounts that have more than one post.

return tags.find([{owner: this.userId, count: { $min: 1}}]);

It ends up returning nothing. I tried using .min() and other stuff as well. I believe its a standard Mongo query and am wondering if there is a Meteor-specific issue?

1条回答
The star\"
2楼-- · 2019-09-06 21:14

The standard Mongo query for that would use $gt:

tags.find({owner: this.userId, count: {$gt: 1}});
查看更多
登录 后发表回答