简体   繁体   中英

Firestore retrieve docs with where clause object in object

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

在此处输入图像描述

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM