I want to get all the jobs that Grade value New/Near New inside the job.
job->container->grade
Equal to New/Near New.
Asked
Active
Viewed 107 times
0

Frank van Puffelen
- 565,676
- 79
- 828
- 807

Jeewantha
- 13
- 4
-
Have you checked? [Firestore - Nested query](https://stackoverflow.com/questions/54857592/firestore-nested-query) – Dharmaraj Aug 24 '21 at 07:41
-
What programming language are you using? Please respond with @AlexMamo – Alex Mamo Aug 24 '21 at 07:42
-
@AlexMamo i am using react JS – Jeewantha Aug 24 '21 at 07:51
1 Answers
1
To get all jobs with a grade value of New/Near New, you can use a query like this:
// Create a reference to the jobs collection
var collectionRef = db.collection("jobs");
// Create a query against the collection.
var query = collectionRef.where("container.grade", "==", "New/Near New");
And then you execute the query as also shown in the docs.

Frank van Puffelen
- 565,676
- 79
- 828
- 807
-
You saved me @Frank . I also want to know about how to set multiple filters inside the where clause programmatically or dynamically. I am using react js i want to set multiple where clauses depend on user input. eg: 1st case User want to filter Status and Created time same time, 2nd case User want to filter status, Created time, Grade same time. How to set Filters depend on user selection> – Jeewantha Aug 25 '21 at 03:55