Skip to content

Instantly share code, notes, and snippets.

@kovaldn
Last active September 28, 2018 15:23
Show Gist options
  • Save kovaldn/5908061 to your computer and use it in GitHub Desktop.
Save kovaldn/5908061 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