Created
August 5, 2016 22:06
-
-
Save beatak/d2fddf05488a7332a2ce769aceb00228 to your computer and use it in GitHub Desktop.
ES6 Map object serialize
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var convertMapToObj = function (myMap) { | |
var obj = {}; | |
myMap.forEach(function (value, key) { | |
obj[key] = value; | |
}); | |
return obj; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment