How to use spread operator in implicit return wherein I'm removing one key value from the array of the object. I can use explicit return but I want shortcode and other possible solution of the scenario.
let array = [
{"sales":2341,"targetMet":false,"advertisment":true},
{"sales":981,"advertisment":true},
{"sales":3423,"targetMet":true,"advertisment":false},
{..},
{..}
];
let expectedArray = array.map(({targetMet,...rest}) => {...rest});
console.log(expectedArray) // should remove all targetMet keys