I'm trying to read a movie object that's being pulled from a firebase firestore. All the data seems to be entered correctly. Below is a code snippet where I pull the movies and am just trying to reference and log the values so I can see what they are.
const savedMovies = await getDocs(collection(db,"users/"+currentUserID+"/savedmovies"));
savedMovies.forEach((doc) => {
console.log(doc.id, " => ", doc.data());
console.log(doc.Title);
console.log(doc.data().Title);
console.log("movie is "+doc.movie.Title);
console.log(movie.Title);
});
doc.id and doc.data() return what I'm expecting but I can't seem to reference the specific values in these entries. The bottom 4 console.log's either error or return undefined. Below is a photo of what doc.data() shows as in the console.
Can anyone explain to me what I'm doing wrong here? Apologies if this is a dumb question and thanks for reading!