I would like to use method filter in Angular.JS and take first element with name Games
$scope.example = [
{model : "Games", id : "1"},
{model : "Pictures", id : "2"},
{model : "Cars", id : "3"},
{model : "Games", id : "4"},
];
in HTML is very easy take this but in JS I don`t know how :(
$scope.example.filter(model:Games).TakeFirst()???
return arr.find(o => o.model === name);