Hi i want to remove from the localStorage a specific item at a specific position. If i have this JSON:
key: user_login 0: { password: "aaaa", indirizzo: "via dei mille" } 1: { password: "kkkk", indirizzo: "via garibaldi 6"}
Now i want delete JSON at position 0(password: "aaaa", indirizzo: "via dei mille"). I try:
var storedNames = localStorage.getItem("user_login_users");
arr1.slice(0,1);
But localStrorage don't remove nothing. With localstorage.removeitem(key) i can't remove all item at position 0. How can i do?
question from:https://stackoverflow.com/questions/65648569/remove-item-at-a-specific-position-in-localstorage