title: Replace _.forEach with something else
body: <p>I have  a problem. I've made a long function which has 4 _.forEach in it. I want to replace some of this _.forEach with something else from lodash or something else. </p>
  
  <p>So, I have many arrays of object and I want to iterate over both of them and compare the values from both of them. I've made it, but I want a better solution to have a cleaner code.</p>
  
  <p>Here is my function:</p>
  
  <pre><code>function refreshFruits() {
       _.forEach($scope.fruits, function(fruit, index){
          _.forEach(vm.toUpdate.somethingLikeFruits, function(somethingLikeAFruit, dIndex) {
               .forEach(somethingLikeAFruit.P, function(dep, nIndex) {
                       _.forEach(fruit.l, function(leg, legindex) {
                                  if(leg.Name === dep.LegName) {
                                      leg.Disc = dep.Discl;
                                      leg.Fore = dep.Projection;
                                  }
                   });
  
            });
  
        });
    }); 
  
  }
  </code></pre>
  
  <p>where fruits is an array of objects, vm.toUpdate.somethingLikeFruits is also an array of objects and P and l are arrays.</p>