Most of the time we have an object stored in our localStorage.
let car = {
brand: "Tesla",
model: "Model S"
};
localStorage.setItem("car", JSON.stringify(car));
I am now eager to update the value of "model". How do I go about achieving this using Javascript?
(Although the code below isn't functional, it provides a glimpse of what I intend to accomplish)
localStorage.setItem(localStorage.getItem("car").model, "Model X");