JavaScript: Object.entries

By Xah Lee. Date: . Last updated: .

New in JS2017.

Object.entries(obj)
Return a Array of [key, value] pairs that are obj's properties that are own, string key, and Enumerable .
console.log(Object.entries({ a: 3, b: 4 }));
// [ [ "a", 3 ], [ "b", 4 ] ]
BUY ΣJS JavaScript in Depth

List Object Properties (to Array)