Build a new object with only the property paths you name — an allow-list. Part of Lodash Object (stable — not deprecated). Opposite of _.omit for fixed key lists.
Pass the object and path or keys shown below. Check whether the helper mutates or returns a new object.
Syntax
Call _.pick. Start with this line.
Lodash
_.pick(object, [paths])
Call
What it does
_.pick(object, [paths])
Primary signature.
_.pick(object)
Work with an object’s keys, values, or paths.
Prefer import pick from "lodash/pick" when you want a smaller bundle.
Library declarations
Lodash
_.pick(object, [paths])
Parameters
Parameter
Description
object
Required. Source object
paths
Required. Property paths to keep (array or rest args)
pick. Names what to keep — safer for API allow-lists.
omit. Names what to drop — fine when secrets are few and known.
Same result. Both remove password here.
Prefer pick when new fields might appear and must stay private by default.
Compatibility
Browser & Runtime Support
_.pick is a Lodash Object helper available in 4.x. It runs anywhere Lodash runs — modern browsers (via CDN or bundle) and Node.js / Bun / Deno with npm install lodash. Native alternatives include object rest/destructuring for top-level keys, or a small loop over paths.
✓ Stable · Lodash 4.x
_.pick()
Available in [email protected] full builds and the lodash/pick modular import. Works in evergreen browsers and current Node LTS when Lodash is installed.
100%With Lodash 4.x
Google ChromeSupported · Desktop & Mobile
Full support
Mozilla FirefoxSupported · Desktop & Mobile
Full support
Apple SafariSupported · macOS & iOS
Full support
Microsoft EdgeSupported · Chromium
Full support
Internet ExplorerNo native support · Use a polyfill
Polyfill
OperaSupported · Modern versions
Full support
Samsung InternetSupported · Android
Full support
BunSupported · JavaScript runtime
Supported
DenoSupported · JavaScript runtime
Supported
Node.jsSupported · Server runtime
Supported
Android WebViewSupported · Modern WebView
Full support
_.pickLodash 4.x
Bottom line: Safe for production once Lodash is on the page or in your bundle. Prefer import pick from "lodash/pick" for smaller builds. Use pickBy for predicates; omit for deny-lists.
Frequently Asked Questions
_.pick(object, [paths]) creates a new object with only the listed property paths. Official example: _.pick({ a: 1, b: '2', c: 3 }, ['a', 'c']) → { a: 1, c: 3 }.
Pass an array (_.pick(obj, ['a', 'c'])) or rest arguments (_.pick(obj, 'a', 'c')). Both forms are equivalent.
No. It returns a new object and leaves the source unchanged (shallow copy of picked values).
Lodash skips it quietly. The result simply omits that key — no error is thrown.
_.pick() is an allow-list (name what to keep). _.omit() is a deny-list (name what to remove).
Use _.pickBy() when selection depends on a runtime condition. Use _.pick() when you already know the exact paths to keep.