Currently, I am developing an angular project and have encountered an object with the following structure:
const obj = {
fruits: ['apple', 'orange', 'None'],
nation: ['usa'],
city: ['New York', 'Delhi', 'None'],
name: ['one', 'two'],
}
The requirement is to remove all values from object keys that contain 'None' value, leaving only the 'None' value in place.
The updated object should be as follows:
const obj = {
fruits: ['None'],
nation: ['usa'],
city: ['None'],
name: ['one', 'two'],
}
Thank you for your help!