I'm sure I'm missing something obvious but the below code does not work when the currentRecord found is true.
What is the best way to iterate through an array and when a match is found, return that record? I think forEach here is part AngularJS.
function getCurrentRecord() {
homePageVideos.forEach(function(rec) {
if (rec.currentRecord === true){
return rec;
}
});
}