Reputation: 36937
Does backbone collections using .where()
or like function accept some form of less/greater-than statements such as <=
, >=
, <
, >
I cant find anything in the documentation that says anything either way
Upvotes: 1
Views: 481
Reputation: 434695
No, where
doesn't support that. From the fine manual:
where
collection.where(attributes)
Return an array of all the models in a collection that match the passed attributes. Useful for simple cases of
filter
.
where
is just a filter
call in disguise so you can use filter
(which is mixed into Backbone collections) directly for more complicated things:
var matches = collection.filter(function(m) {
/* check model `m` here */
});
Upvotes: 2