How to get the object with the desired properties in one line?

Hi.

Is there a JS way to cut to obtain the desired properties in the object in one line instead of 2?

This does not exist let {{ name, size }} = object;

const object = {
 name: "Jon",
 size: 12,
 lang: "EN"
}

let { name, size } = object;
let coll = {name, size};

console.log(coll);


At the output the desired object with name, size, properties.
March 12th 20 at 08:02
1 answer
March 12th 20 at 08:04
Solution
const object = {
 name: "Jon",
 size: 12,
 lang: "EN"
}

let { lang, value...} = object;

console.log(value);

Find more questions by tags JavaScript