I am working on an angular project and I have an object like this
const obj = {
fruits: ['apple', 'orange', 'None'],
nation: ['usa'],
city: ['New York', 'Delhi', 'None'],
name: ['one', 'two'],
}
if the object key values have a 'None' value I have to remove the other values and keep it 'None' value only.
The answer looks like below:
const obj = {
fruits: ['None'],
nation: ['usa'],
city: ['None'],
name: ['one', 'two'],
}
Thanks in advance