How can I save a localStorage value with special characters?
I currently have the following value: ald:20221219_1833|atrv:lMh2Xiq9xN0-is9qy6DHBSpBL3ylttQQew but when I try to store it, it appears as if there is an arrow indicating that the value can be expanded to show the same content but without {}, furthermore, how can I properly insert keys containing slashes and colons, and ensure the value is enclosed in double quotes? Initially, I believed it was an object, however my attempts to assign the value to a variable failed.
var lsvalue = {
/: "ald:20221219_1833|atrv:lMh2Xiq9xN0-is9qy6DHBSpBL3ylttQQew",
}
localStorage.setItem('rmStore', JSON.stringify(lsvalue))
The code above did not work, do you have any suggestions or alternative approaches?
I have tried implementing the suggested code snippet without success.