Is it possible to do without forEach in this example: There is an array of the form
{ count: 0, models: [ { name: 'ACE', url: 'ace', count: 0 }, { name: 'Cobra', url: 'cobra', count: 0 } ], } You need to get the value of the "url" field knowing the name of the model "ACE" or "Cobra"
In the case of the forEach solution
vehicle.models.forEach(function(cell, index) { if(cell.name === ads.car.model.name) { ads.car.model.url = cell.url; } }); Maybe there are alternatives?