// Update endDate to be null
Utility.updateAppPlansObject(options, planName, {
$unset: {
'appPlans.list.$.endDate': '',
},
});
Utility.setAppPlansObject(options, modifier);
return true;
Otherwise, the $addToSet modifier does not work and it adds duplicate plans with exact same parameters in the appPlans.list object