Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ryanburnette/alphabetize-object-keys

Alphabetize the keys in an object.
https://github.com/ryanburnette/alphabetize-object-keys

Last synced: 17 days ago
JSON representation

Alphabetize the keys in an object.

Awesome Lists containing this project

README

        

# alphabetize object keys

[![npm version](https://badge.fury.io/js/%40ryanburnette%2Falphabetize-object-keys.svg)](https://badge.fury.io/js/%40ryanburnette%2Falphabetize-object-keys)

Turn this...

```javascript
var obj = {
c: 'c',
b: 'b',
a: {
b: 'b',
a: 'a'
}
}
```

...into this...

```javascript
var obj = {
a: {
a: 'a',
b: 'b'
}
b: 'b',
c: 'c',
}
```