I have an object that I want to assign to the local storage , I mean can you loop over it ? any idea how to implement this ? The end result is the keys in the object must be keys as well in the local storage after using the setitem, I sure know how set and get singular items but in other words I want to mount and object on an empty local storage object.
const data = JSON.parse(object); // a prev localstroage object
console.log(data);
localStorage.setItem(...Object.keys(data), ...Object.values(data));