So the structure of my Array looks like this:
Messages: [
0:{
email: "Johndoe@gmail.com"
fullName: "John Doe"
text: [
0: "hi there!"
1: "What's up?"
]
}
]
I want to push a new item to the nested array "text" and I have tried several different ways with userRef.update({})
.
userRef = db.collection("user").doc("email")
userRef.update({
messages:
)}
but this is where I get stuck. I need to add to the text array where email === "johndoe@gmail.com"
I would appreciate any other idea of structuring the message Array.