Skip to content

Instantly share code, notes, and snippets.

@davidgtonge
Created August 30, 2011 20:14
Show Gist options
  • Save davidgtonge/1181892 to your computer and use it in GitHub Desktop.
Save davidgtonge/1181892 to your computer and use it in GitHub Desktop.
filtering an object with an array in coffeescript
filterElements = (validate, filter) ->
filtered = {}
for key, vars of validate
if key in filter then filtered[key] = value
filtered
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment