var arr = new Map([ ['k1', '1'], ['k2', '0'], ['k3', '1'] ]); console.log(arr); localStorage.name = JSON.stringify([...arr]) var storedAry = new Map(JSON.parse(localStorage.name || "[]")); console.log(storedAry);