Created
September 1, 2011 07:47
-
-
Save Arwid/1185661 to your computer and use it in GitHub Desktop.
Nifty way of creating an array of objects
This file contains hidden or 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
config = _.map [ | |
[1, "Important", "Urgent"] | |
[2, "Important", "Not Urgent"] | |
[3, "Not Important", "Not Urgent"] | |
[4, "Not Important", "Not Urgent"] | |
], (x) -> {id:x[0], vtitle:x[1], htitle:x[2]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment