Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

104
Views
Reading object returned from firestore in javascript

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.

Image snip from the console for doc.data()

Can anyone explain to me what I'm doing wrong here? Apologies if this is a dumb question and thanks for reading!

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!