I have a collection that I publish to client, limiting number of documents and sending ones that matter to client. Like this:
Meteor.publish('list', function() {
return someList.find( { matters: true }, { limit: 50 } );
});
But I also want to send to clients some other values from that collection, like total count of documents, average value of some field, etc.
How to make server to calculate it and send value to client how will just display it?