Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js extract properties from object

const object = { a: 5, b: 6, c: 7  };
const picked = (({ a, c }) => ({ a, c }))(object);

console.log(picked); // { a: 5, c: 7 }
 Run code snippet
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #extract #properties #object
ADD COMMENT
Topic
Name
4+9 =