Answers for "arrayofobject convert to array in js"

4

how can i convert object to an array javascript

const entries = Object.entries(person);

console.log(entries);
Code language: JavaScript (javascript)
Posted by: Guest on January-29-2021
0

js convert obj to array

const array = [
  ['key', 1],
  ['two', 2],
];

Object.fromEntries(array);
// { one: 1, two: 2 }
Posted by: Guest on August-19-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language