0

I want to get all the jobs that Grade value New/Near New inside the job. job->container->grade Equal to New/Near New.

enter image description here

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Jeewantha
  • 13
  • 4

1 Answers1

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