Creates a new object composed of the picked object properties. Based on https://es-toolkit.slash.page/reference/object/pick.html
This function takes an object and an array of keys, and returns a new object that includes only the properties corresponding to the specified keys.
The type of object.
The type of keys in object.
The object to pick keys from.
An array of keys to be picked from the object.
A new object with the specified keys picked.
const obj = { a: 1, b: 2, c: 3 };const result = pick(obj, ['a', 'c']);// result will be { a: 1, c: 3 } Copy
const obj = { a: 1, b: 2, c: 3 };const result = pick(obj, ['a', 'c']);// result will be { a: 1, c: 3 }
Creates a new object composed of the picked object properties. Based on https://es-toolkit.slash.page/reference/object/pick.html
This function takes an object and an array of keys, and returns a new object that includes only the properties corresponding to the specified keys.