TBH I just did it because I could.
localStorage.data = localStorage.data.replace('sword1', goldensword')
But it just reverts after I type that into the console. Could someone explain how it works?
localStorage.data = JSON.stringify((function (data) { data.player.weapon = 'goldensword'; return data })(JSON.parse(localStorage.data)))
and then reloaded the page, and I had the golden sword.It be fun to show off if someone figured it out.