remove an item form a position in local storage

Hi i want remove an item from local storage. I try this code:

var pos=JSON.parse(JSON.stringify(localStorage.getItem("position_users")));
var storedNames = JSON.parse(localStorage.getItem("user_login_users"));
    }else if(storedNames.length>1){
        localStorage.setItem("user_login_users", JSON.stringify(storedNames));
        alert("utente cancellato");"onlinemoviecatalog.html");

where user_login_users={[name:"jack"surname:"rossi", name:"rosy",surname:"chan"]} and position_users={[0]}.User_login_users and position_users are in JSON. My code don't remove nothing. How can i do?

Read more here:

Content Attribution

This content was originally published by Elena Rondina at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: