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 a year 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

Srinivas  Kasiriveni
Srinivas Kasiriveni
~ 5 years ago

nice

Emanuel Canova
Emanuel Canova
~ 5 years ago

Thanks! :)

Md. Anam Hossain
Md. Anam Hossain
~ 5 years ago

Awesome

Markdown supported.
Become a member to join the discussionEnroll Today