How the delete operator can be your super saver!
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...
ramyachinnadurai.in5 min read
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}