Course lesson
Convert an Object to an Array and back again with Object.entries and Object.fromEntries
Use these functions in order to flip back and forth between an Object and an Array.
- Duration
- 0 min
- Access
- Free
- Transcript
- Available
Use these functions in order to flip back and forth between an Object and an Array.
Video Transcript
Instructor: 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