Say I have an object:
elmo = { color: \'red\', annoying: true, height: \'unknown\', meta: { one: \'1\', two: \'2\'} };
I want to m
Try
const elmo={color:"red",annoying:!0,height:"unknown",meta:{one:"1",two:"2"}}; const {color, height} = elmo; newObject = ({color, height}); console.log(newObject); //{ color: 'red', height: 'unknown' }