I've tried searching this online but I usually find code that removes based on index and not on the actual value.
var arrDefaultLoanTypes = {
1:"Regular Loan",
2:"Emergency Loan",
3:"Special Loan",
4:"Instant Loan",
5:"Financing",
6:"Housing Lot Loan",
7:"Salary Loan",
11:"Appliance Loan",
12:"Motorcycle Loan",
13:"Educational Loan",
17:"Grocery Loan"
};
I have a variable called selectedLoanType
which serves as an indicator on what to remove. Example "Emergency Loan" or "Regular Loan" should be removed regardless of the value on the left hand side