Today I had to get unique values from a collection and I found this method by Jonathan Pidgeon using the underscore library
.
Get unique values from a collection in Meteor
var myArray = CollectionName.find().fetch();
var distinctArray = _.uniq(myArray, false, function(d) {return d.foo});
var disctinctValues = _.pluck(distinctArray, 'foo');
Since it helped me I thought it was a good idea to post it here in the forums.
Also if there is a better way to get unique values, please let me know