Skip to content

Instantly share code, notes, and snippets.

@jdjkelly
Created October 4, 2012 20:08
Show Gist options
  • Save jdjkelly/3836089 to your computer and use it in GitHub Desktop.
Save jdjkelly/3836089 to your computer and use it in GitHub Desktop.
Build a JS array of properties from an object
buildArrayFromKeys: (keys, object) ->
arr = []
keys.forEach (i) ->
arr.push _.clone(object[i])
arr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment