I have this object
inputErrors:
value: Array(8)
0: "name"
1: "industry"
2: "address"
3: "crn"
4: "website"
5: "employeesNbr"
6: "phoneNumber"
7: "userRole"
if I get sent a param to a function called key which is basically either from name to userole, what statement can i use to the delete the whole value that contains that key?
I used
inputErrors.value.splice(key);
This reseted the whole object. What i need is ill be sent a key of kind string which will either be {name,industry...}, and what i will want is delete its corresponding index. so for example if they key sent is address and delete address it becomes:
0: "name"
1: "industry"
3: "crn"
4: "website"
5: "employeesNbr"
6: "phoneNumber"
7: "userRole"
Thank you