DEV Community

Dillon
Dillon

Posted on

Iterating over object data

To convert object data into array data, there are three different ways.

Object.keys(), Object.values(), Object.entries()

Object.keys(arrayName) will return an array of the keys in the object.

Object.values(arrayName) will return an array of the values in the object.

Object.entries(arrayName) will return an array of the key-value pairs in the object.

Top comments (0)