get object with only few properties javascript code example
Example: javascript object get subset
const object = { a: 5, b: 6, c: 7 };const subset = (({ a, c }) => ({ a, c }))(object);console.log(subset); // { a: 5, c: 7 }
const object = { a: 5, b: 6, c: 7 };const subset = (({ a, c }) => ({ a, c }))(object);console.log(subset); // { a: 5, c: 7 }