How can I upload this multidirectional array to the localstorage but without it appearing without properties?
for (let i = 0; i < uniqueUsers.length; i++) {
var data = [];
var y = 0;
console.log(uniqueUsers[i])
db.collection("stories").where("name", "==", uniqueUsers[i]).get().then((querySnapshot) => {
y++
var temp = [];
querySnapshot.forEach((doc2) => {
temp.push(doc2.data())
})
data.push(temp);
}).catch((err) => {
alert(err)
})
}
localStorage.setItem("hUsers", JSON.stringify(data));
console.log(data)