2014-12-05 111 views

回答

1

这是什么在起作用:

Template.all.helpers({ 
    linkList: function() { 
    var everything = *yourCollection*.find().fetch(); 
    var *yourUniqueFieldItems* = _.pluck(everything,"*YourField*"); 
     return _.uniq(*yourUniqueFieldItems*); 
    }, 

顶部投票答案在这里:Meteor: how to search for only distinct field values aka a collection.distinct("fieldname") similar to Mongo's不起作用,但帖子的作者发现了一个解决方案自己。不幸的是,它被埋在评论中,而不是真正的答案。

相关问题