JS: Object.values

By Xah Lee. Date: . Last updated: .

(new in JS: ECMAScript 2017)

Object.values(obj)

Return a Array that are obj's property values that are string key and own and Enumerable.

console.log(JSON.stringify(Object.values({ "a": 3, "b": 4 })) === `[3,4]`);
// true

JavaScript. List Object Properties (to Array)