Created
July 3, 2014 06:42
-
-
Save sclausen/7c655d0a99c0a434e066 to your computer and use it in GitHub Desktop.
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
Template.foo.helpers({ | |
data1: function(){ | |
var array = []; | |
var storedData = Session.get("data"); | |
//underscore | |
_.each(Object.keys(storedData),function(key){ | |
array.push(storedData[key]); | |
}); | |
return array; | |
}, | |
data2: function(){ | |
var array = []; | |
var storedData = Session.get("data"); | |
//lodash | |
_.forIn(storedData, function(key){ | |
array.push(storedData[key]); | |
}); | |
return array; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment