function loadSettings(){ let strSettings=storage["settings"]||"{}"; return JSON.parse(strSettings) } function saveSettings(settings){ storage["settings"]=JSON.stringify(settings) }
var settings=loadSettings(); settings.username = "banxi"; settings.age=10; settings.autoLogin=true; saveSettings(settings);