Answers for "parse objecr to array js"

1

converting object to array in js

const numbers = {
  one: 1,
};

const objectArray = Object.entries(numbers);

objectArray.forEach(([key, value]) => {
  console.log(key); // 'one'
  console.log(value); // 1
});
Posted by: Guest on July-22-2020
8

object to array javascript

Object.values(obj)
Posted by: Guest on February-02-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language