Created
April 18, 2016 13:01
-
-
Save fernandojunior/c128b02115a90cdfc072cdf57d6067d1 to your computer and use it in GitHub Desktop.
object to array
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var objectToArray = function(object) { | |
| return Object.keys(object).map(function(key) { | |
| return {'key': key, 'value': object[key]}; | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment