Obtenha LocalStorage
function get(){
var getJson = localStorage.getItem('key')
if(getJson){
arrayName = JSON.parse(getJson)
}
}
Bad Bug
function get(){
var getJson = localStorage.getItem('key')
if(getJson){
arrayName = JSON.parse(getJson)
}
}
let retriveItem = JSON.parse(localStorage.getItem("data"));
var Item = localStorage.getItem('youritem');
// localStorage for objects, arrays or any data type
var obj = {
firstName: "Bob",
lastName: "Jeff",
age: 13
}
localStorage.setItem("itemname", JSON.stringify(obj)); // Save the obj as string
var item = JSON.parse(localStorage.getItem("itemname"));
// ^^ Parse string then set `item` as the obj
JSON.parse(localStorage.getItem('user')).id
var pull=JSON.parse(localStorage.getItem('data'))
for(var i=0; i<pull.length; i++){
new arrayName(pull[i].AnyName, pull[i].AnyName, pull[i].AnyName)