pick
Picks the key-value pairs corresponding to the given keys from an object.
- Use
Array.prototype.reduce()
to convert the filtered/picked keys back to an object with the corresponding key-value pairs if the key exists in the object.
Picks the key-value pairs corresponding to the given keys from an object.
Array.prototype.reduce()
to convert the filtered/picked keys back to an object with the corresponding key-value pairs if the key exists in the object.