Pattern. Same idea works with _.mean, _.max, and friends.
Compatibility
Browser & Runtime Support
_.values is a Lodash Object helper (since 0.1.0). It runs anywhere Lodash runs — modern browsers (CDN or bundle) and Node.js / Bun / Deno with npm install lodash. Closest native cousin is Object.values() (ES2017); Lodash stays useful for null-safety and consistent Object API with _.keys / _.valuesIn.
✓ Stable · Lodash 4.x
_.values()
Available in [email protected] full builds and the lodash/values 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
_.valuesLodash 0.1+
Bottom line: Safe for production once Lodash is loaded. Prefer import values from "lodash/values" for smaller builds. Ideal before summing, filtering, or mapping object values as arrays.
Frequently Asked Questions
_.values(object) returns an array of the object's own enumerable string-keyed property values. Keys are dropped — only values remain.
No. It returns a new array. The source object is unchanged.
No. Only own enumerable properties. Use _.valuesIn() when you also need inherited enumerable values.
For plain objects they match in modern JS. Lodash is null-safe: _.values(null) and _.values(undefined) return [] instead of throwing.
_.keys() returns names; _.values() returns values for the same own enumerable string keys. Lengths match for normal objects.
Use import values from "lodash/values" or require("lodash/values"). Full build: import _ from "lodash" then _.values.