Object.fromEntries

The Object object has been buffed with useful methods over the past few years.  Object.keys, Object.values, Object.freeze, and Object.assign all address frequently desired functionality.  One of the new Object methods is fromEntries, which accepts a Map or map-like array nesting and converts it to a useful object literal! Convert Map to Object Converting a Map to a key:value […]
The post Object.fromEntries appeared first on David Walsh Blog.

Link: https://davidwalsh.name/objectfromentries