Convert an Object to an Array and back again with Object.entries and Object.fromEntries

Laurie Barth
InstructorLaurie Barth
Share this video with your friends

Social Share Links

Send Tweet
Published 5 years ago
Updated 2 years ago

Use these functions in order to flip back and forth between an Object and an Array.

Instructor: [00:01] We start with an object. We can turn that object into an array using object.entries, and pass in our object. To reverse that, we can use object.fromEntries and pass in our array. This results in our original object