Sort objects by property name. It detects property type such as number, string, and date and sort them properly.
var models = [
{name: "john", level: 42, dob: "01/12/1940"},
{name: "joe", level: 12, dob: "01/12/1941"},
{name: "amber", level: 50, dob: "02/2/2001"}
];
// cache the sort fn, and sort by name
var sortFnCache = sortProp('name');
models.sort(sortFnCache);
See demo (in console) http://jsfiddle.net/lvo811/dWvS7/