7
如何鏈接收集方法backbone.js?鏈Backbone.js收集方法
var Collection = this.collection;
Collection = Collection.where({county: selected});
Collection = Collection.groupBy(function(city) {
return city.get('city')
});
Collection.each(function(city) {
// each items
});
我想這樣的事情,但它是錯誤的:
Object[object Object],[object Object],[object Object] has no method 'groupBy'