Reputation: 541
I'm trying to publish all records in a Meteor collection except two. Let's say their document IDs are "abc" and "xyz." Does anyone know how to write that?
Upvotes: 1
Views: 95
Reputation: 8708
Try:
Meteor.publish("my_pub", function() {
return Something.find({ _id: { $nin: ['abc', 'xyz'] }})
})
Upvotes: 2