Answers for "converting object to array in 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

Code answers related to "converting object to array in js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language