Before I make this API call I need to remove the product that contains a selectedPlan value of null. I am unsure as to why the below is not working. Do I need reassignment of stepper array before passing as parameter in startEnrollment()?
startEnrollment(stepperArray: MhnStartEnrollmentRequest[]) {
stepperArray.forEach(value => {
if (value.selectedPlan === null) {
delete stepperArray[value.productId]
}
});
stepperArray.values();
return this.mhnApiClientService.startEnrollment(stepperArray, this.quoteId, this.clientId);
}