Creates a function that returns the value at path of a given object — a reusable path getter. Part of Lodash Util since 2.4.0 (stable — not deprecated).
Note: Collection methods already accept property shorthands (_.map(arr, 'a.b')). Use _.property when you need an explicit, reusable accessor.
Syntax
Call _.property. Start with this line.
Lodash
_.property(path)
Call
What it does
_.property(path)
Primary signature.
_.property(...)
Call the util helper.
Prefer import property from "lodash/property" when you want a smaller bundle.
Output note. The demo prints "function" for clarity in text.
Compatibility
Browser & Runtime Support
_.property is a Lodash Util helper since 2.4.0. It runs anywhere Lodash 2.4+ / 4.x runs — modern browsers (CDN or bundle) and Node.js / Bun / Deno with npm install lodash.
✓ Stable · Lodash 2.4.0+
_.property()
Available in [email protected] full builds and the lodash/property modular import. Works in evergreen browsers and current Node LTS when Lodash is installed.
100%With Lodash 2.4+
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
_.propertyLodash 2.4.0+
Bottom line: Safe for production once Lodash is loaded. Prefer import property from "lodash/property" for smaller bundles. Collection methods already accept path-string shorthands with the same rules.
Frequently Asked Questions
_.property(path) returns a getter function. Pass an object to that getter and it returns the value at path—same resolution rules as _.get.
A string like 'a.b' or an array of keys like ['a', 'b']. Both forms work with nested objects.
_.get(object, path) reads once. _.property(path) returns a reusable function you can pass to _.map, _.sortBy, or store for later.
Usually no. _.map(objects, 'a.b') already uses the property iteratee shorthand. Wrap with _.property when you want an explicit, reusable getter.
_.property reads the value at the path. _.method calls the value if it is a function. Use property to pluck; use method to invoke.
The getter returns undefined. It does not throw. Use _.get(object, path, defaultValue) when you need a fallback in one call.