If you need to transform an array into an object, you can use
Array.map in conjunction with
Object.keys is a method that can be used to return an array of keys from an object.
Let’s say we needed to transform
schools object into an array of schools:
Decide what you want to do. Array to object or object to array?
Share this highlighthttp://www.safaribooksonline.com/a/learning-react/15373905/