Skip to content

Instantly share code, notes, and snippets.

@advanced
Created December 11, 2012 12:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save advanced/4258287 to your computer and use it in GitHub Desktop.
Save advanced/4258287 to your computer and use it in GitHub Desktop.
function n(data){
o={}
_.keys(data).forEach(function(key){
o[key]=m(data[key])
})
}
function m(data){
t = {}
data.forEach(function(d){
if (_.isObject(d))
t[_.keys(d)[0]]=d[_.keys(d)[0]]
})
return t
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment