[javascript] How to convert a plain object into an ES6 Map?