I can successfully do this:
App.SomeCollection = Backbone.Collection.extend({ comparator: function( collection ){ return( collection.get( \'lastName\' ) );
Looking at the source code, it seems there's a simple way to do it, setting comparator to string instead of function. This works, given Backbone.Collection mycollection:
mycollection.comparator = key; mycollection.sort();