In this article lets discuss how the delete operator in javascript can be your rescuer. I'm jotting down my learning and working experience, so that others may found useful. Recently I came up with a scenario where there is an array of objects with t...
Markdown supported · ⌘↵ to post
Pavan Mehta
JS Development and Everything in Between
You could also use rest operator for doing this.
const { type, status,_id, ...rest} = value const details = { [type]: { ...rest } } return {...acc, ...details}