Node.js examples for Object:Object Operation
Sort object properties by key
Object.sortByKeys = function (obj) { var that = obj; return Object.keys(obj).sort().reduce(function (result, key) { result[key] = that[key];//from ww w . j a v a2 s . c o m return result; }, {}); }