Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2017.
The Object.values() static method returns an array of a given object's own enumerable string-keyed property values.
An object.
An array containing the given object's own enumerable string-keyed property values.
Object.values() returns an array whose elements are values of enumerable string-keyed properties found directly upon object. This is the same as iterating with a for...in loop, except that a for...in loop enumerates properties in the prototype chain as well. The order of the array returned by Object.values() is the same as that provided by a for...in loop.
If you need the property keys, use Object.keys() instead. If you need both the property keys and values, use Object.entries() instead.
Non-object arguments are coerced to objects. undefined and null cannot be coerced to objects and throw a TypeError upfront. Only strings may have own enumerable properties, while all other primitives return an empty array.
| ECMAScript® 2027 Language Specification # sec-object.values |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Jul 20, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.