JavaScript Object.values() Method
The Object.values() static method returns an array of an object's property values.
Description
The Object.values() static method returns an array of the object's own enumerable property values, in the same order as Object.keys(). It's convenient for totals and searches across an object's values.
Only own enumerable string-keyed properties are included, in the same order as Object.keys(). Getters are called, so their current values are returned. Primitives are converted to objects first, and null or undefined throw a TypeError.
For a Map, use its own values() method instead, which returns an iterator. If you need both keys and values, Object.entries() gives them together.
Syntax
Object.values(obj)Parameters
- objThe object to work with.
Return Value
An array of the object's own enumerable string-keyed property values.
Example
Browser Support
The following information will show you the current browser support for the Object.values() method. Hover over a browser icon to see the version that first introduced support for this method.
Desktop





Tablets & Mobile





