In order to filter a
Backbone.Collection, you are maybe doing this:
Collection.filter(/* your filter condition */)
Array and not a
There are some case when you'd like to be able to use convenient Collection methods to filtered values.
To achieve this, just wrap the returning object into an Underscore object:
var filtered = _(collection.filter(/* filter condition */)); /* calling a Backbone.Collection method */ console.log(filtered.size())
Not very elegant, but it does do the job.