Having trouble looping through a JavaScript object from localStorage. Here is my output:
{"widget": {"title": "blablabla", "color": "yellow"},"widget": {"title": "lorem ipsum", "color": "black"},......}
// Attempted solution (the key works)
var list = JSON.parse(the localStoragekey);
for(var key in list){
if (list.hasOwnProperty(key)){
console.log(list[key])
}
}
Despite researching online and on sites like Stackoverflow, I have yet to find a functional solution.