Change key value in localStorage?

Viewed 5153

I have a localStorage item named as "1" and containing "something".

I want to change the name to "2" and leave the contents intact. How can I do that?

I know that I can copy the entire contents to "2" and then delete "1" but is there any other direct method?

1 Answers
Related