Reputation: 5329
Say i have a some store with some data:
id value
1 one
2 two
3 three
4 four
and i'd like to filter it by ID like:
store.filter("id", "[1, 4]");
Is it possible?
Is there also an another way to get a few values from store by id
?
Upvotes: 2
Views: 5966
Reputation: 361
store.addFilter({property: 'id', value: [1,4], operator: 'in'});
Upvotes: 0
Reputation: 17860
store.filter(function(r) {
var value = r.get('id');
return (value == 1 || value == 4);
});
Upvotes: 8