Answers for "obj to arrqay js"

CSS
4

javascript object to array

//Supposing fooObj to be an object

fooArray = Object.entries(fooObj);

fooArray.forEach(([key, value]) => {
  console.log(key); // 'one'
  console.log(value); // 1
})
Posted by: Guest on March-16-2020
2

js get all values of object

Object.values(object1)
Posted by: Guest on February-21-2020

Browse Popular Code Answers by Language