underscore find code example
Example 1: find element in array underscore js
console.log(_.find(response.data, function(item) {
return item.TaskCategory.TaskCategoryId == $routeParams.TaskCategory;
}));
Example 2: underscore js join
_.reduce(['x', 'y', 'z'], function(accumulator, currentItem) {
return accumulator + currentItem;
});
// xyz