Creates a new object composed of properties picked from another object.
The object to pick properties from.
An array of property names to use.
The new object.
const sourceObj = { a: 1, b: 2, c: 3}const pickedObj = pick(sourceObj, ['a', 'c'])// pickedObj is now { a: 1, c: 3 } Copy
const sourceObj = { a: 1, b: 2, c: 3}const pickedObj = pick(sourceObj, ['a', 'c'])// pickedObj is now { a: 1, c: 3 }
Creates a new object composed of properties picked from another object.