Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

convert object to array javascript

const numbers = {
  one: 1,
};

const objectArray = Object.entries(numbers);

objectArray.forEach(([key, value]) => {
  console.log(key); // 'one'
  console.log(value); // 1
});
Source by www.samanthaming.com #
 
PREVIOUS NEXT
Tagged: #convert #object #array #javascript
ADD COMMENT
Topic
Name
4+9 =