Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

delete multiple keys from object javascript

const obj = {
        a: 'dog',
        b: 'cat',
        c: 'mouse',
        d: 'cow',
        e: 'horse',
    };
const {a, e, ...updatedObject} = obj;

// output
console.log(updatedObject)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #delete #multiple #keys #object #javascript
ADD COMMENT
Topic
Name
2+9 =