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

163
Views
Create Firestore query dependend on collection inside document

I have a firestore db that looks like this:

dummy_collection:{
                  id: {
                       data: {...},
                       metaData: {
                                  date: "2020-06-15",
                                   ...
                                 },
                      },
                 },

I want to make a query based on the date-field.

I tried with:

db.collection("dummy_collection").where("metaData/date", "==", "2020-06-15")

but received:

ValueError: Path metaData/date not consumed, residue: /date

Is a query like this possible with firestore?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Nested fields are addressed with a ., not with a /. So:

db.collection("dummy_collection").where("metaData.date", "==", "2020-06-15")

Also see the documentation on updating fields in nested objects, which is the only in the documentation that I know mentioned the . notation

about 4 years ago · Juan Pablo Isaza Report
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!