Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save anelad/0505d76bf0834c0caab3041fd8c5b945 to your computer and use it in GitHub Desktop.
Save anelad/0505d76bf0834c0caab3041fd8c5b945 to your computer and use it in GitHub Desktop.
Javascript: parse object to array (underscore)
/*
* Underscore
* Parse object to array
*/
_(obj).each(function(elem, key){
// console.log(elem);
// console.log(key);
obj[key] = _(elem).values();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment