let fruits = [ { name: 'apple', color: 'red', number: 1 }, { name: 'orange', color: 'orange', number: 2 } ] localStorage.setItem("saved_fruits", JSON.parse(JSON.stringify(fruits)));