A function from lodash could simplify this for loop. I think `_.where(currentRegistration.answers, { 'blockId': $scope.block.id });` would do it.