0

i have a firestore collection thats structured like this:firestore collection

and i am trying to query as follows: await db.collection('users').where("company.id", "==", company).where("profiles.default.dailyQuestion", "array-contains", {questionId: 'MwIGtFpz8qzVxJEW5TWc'}).get()

i believe that i am approaching it correctly but it is returning no data from firestore. am i missing something obvious?

G.Mall
  • 1
  • 1
  • Maybe an [index](https://stackoverflow.com/questions/50305328/firestore-whereequalto-orderby-and-limit1-not-working)? – Alex Mamo May 14 '22 at 08:14
  • See the duplicate: It is not possible, with array-contains, to query for a specific property of an object stored in an array. However, there is a possible workaround: it is actually possible to query for the entire object. – Renaud Tarnec May 14 '22 at 08:37

0 Answers0