There is an object Obj from the property atr whose value is a string. I bring to the number and compare from the variable val , which is a number from 1 to 5.
Example: if val is 5, then remove anything less than or greater than 5 from the object.
It is impossible to remove an element from an object that meets or does not meet the comparison condition.
Tell me how to do this?
Obj = { atr: "10", atr: "1", atr: "2", atr: "11", atr: "20", atr: "10" }