Created
August 30, 2011 20:14
-
-
Save davidgtonge/1181892 to your computer and use it in GitHub Desktop.
filtering an object with an array in coffeescript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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