I am fetching some records, and using the filter property as shown below;
store = Ext.getStore('PEOPLE');
store.on('load', function() {
store.filter({
filterFn: function(f) {
return f.get('Name') == "SAM";
}
});
});
store .load();
The above code, will filter all Names that has the name SAM. But, what i want it to ONLY return 1 name (just only SAM (Once)).
For example, in databases we use the keyword DISTINCT to get just 1 record (if there are multiples). How can i do this in my scenario ?
Is this perhaps what you’re looking for?