/ Published in: JavaScript
Find an object in a collection with underscore. Using the filter function from underscore.
Expand |
Embed | Plain Text
initialize : function() { this.folders = new FolderCollection(); }, analize : function(event){ var selected = _.filter(this.folders, function(num) { return num.attributes.name == event; }); console.log(selected); }, .....
You need to login to post a comment.
