I can sort Object in JavaScript
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
.npmignore
.travis.yml
Makefile
README.md
index.js
package.json

README.md

sortobj

Build Status

Convert Object to corresponding sorted-key Array.

Installation

$ npm install sortobj

Examples

var sortobj = require('sortobj');

obj = {b: {z: 1, y: 2}, c: 3, a: 1};
arr = [['a', 1], ['b', [['y', 2], ['z', 1]]], ['c', 3]];
sortobj(obj).should.eql(arr);