Results differ because the object has both shapes.
Rule. Prefer array paths for unusual key names.
Compatibility
Browser & Runtime Support
_.at is a Lodash Object helper (since 1.0.0). It runs anywhere Lodash 4.x runs — modern browsers (CDN or bundle) and Node.js / Bun / Deno with npm install lodash.
✓ Stable · Lodash 1.0.0+
_.at()
Available in [email protected] full builds and the lodash/at 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
_.atLodash 1.0.0+
Bottom line: Safe for production once Lodash is loaded. Prefer import at from "lodash/at". Use _.get for one path with a default, or _.pick when you need an object.
Frequently Asked Questions
_.at(object, ...paths) creates an array of values corresponding to paths of object. Each result slot matches the path at the same index.
_.get reads one path and returns that value (or a default). _.at reads one or many paths and always returns an array.
_.pick returns a new object of selected keys. _.at returns an array of values in path order — handy for destructuring.
The matching array slot is undefined. The result length still equals the number of paths.
Yes — pass an array path segment, e.g. _.at(obj, [["weird.key"]]), so the key is not split on dots.
Use import at from "lodash/at" or require("lodash/at"). Full build: import _ from "lodash" then _.at.