I have a list of users (six to be exact) in a collection with \'firstname\', \'lastname\' properties. Doing a fetch, the comparator below sorts them by \'firstname\', and it wor
To respond to your update:
If you're wanting to change the order that the collection is sorted in for use by it's corresponding view then you could just update the comparator
and then call sort
to get the model re-sorted. This will then fire a sort
event which your view can listen for and update itself accordingly.
this.collection.comparator = function (user) {
return user.get("firstname").toLowerCase();
};
this.collection.sort();