(1)Map转为数组
array = [...map]
(2)数组转为Map
map = new Map([[true, 7], [{foo: 3}, ['abc']]])
(3)Map转为对象
a = {a:1,b:2}
map = new Map(Object.entries(a));
c = Object.fromEntries(map.entries())
(4)对象转为Map
a = {a:1,b:2}
map = new Map(Object.entries(a))
(5)Map转为JSON
json = JSON.stringify(Object.fromEntries(map.entries()))
(6)JSON转为Map
map = new Map(Object.entries(JSON.parse(json)))