This helper can be used with the Array.sort(); method for sorting an array of objects by an objects attribute.
var a = [obj5,obj1,obj8,obj3,obj2,obj9,obj4,obj6,obj7];
a.sort(arrange.byObjectsAttribute('name'));
Sort above list by: date - name
Code for this example here.
This page is a result of techniques described by Douglas Crockford
Page by: Trygve Lie