convert entire object to array es6 code example
Example 1: object to array javascript
Object.values(obj)
Example 2: js convert obj to array
const array = [
['key', 1],
['two', 2],
];
Object.fromEntries(array);
// { one: 1, two: 2 }
Object.values(obj)
const array = [
['key', 1],
['two', 2],
];
Object.fromEntries(array);
// { one: 1, two: 2 }