I have the following if statement. Is this expression able to be simplified into a ternary statement? I'm having trouble figuring it out since group needs to be assigned based on the value of coverageLineId
let group;
if(coverageLineId == 1)
group = this.medicalBenefitsGroupsView.find((x) => x.value === groupValue);
else if (coverageLineId == 2)
group = this.dentalBenefitsGroupsView.find((x) => x.value === groupValue);
else if (coverageLineId == 3)
group = this.visionBenefitsGroupsView.find((x) => x.value === groupValue);