1

I need to return all documents from a collection from the tags field.

The tags field is a list of strings, I need to return all documents that the id is equal to the tagId that I send in the where parameter to query.

Below my code to make the query.

  document = this.afs.collection(entity || path,
    ref => ref.where(where.field, where.condition, where.value));

where.field: tags

where.condition: ==

where.value: '9fizZoFA75NjQgVkoBfD'

You are not returning any documents the way I am doing, what can I be doing wrong?

enter image description here

Luiz
  • 449
  • 5
  • 17
  • I'm not trying to search inside an object, I'm trying to search inside an array, inside that array I have objects with a value of type string. – Luiz Jul 17 '18 at 23:27
  • This is an event that does not meet my need https://firebase.google.com/docs/firestore/solutions/arrays?hl=en. In this example a query is made inside an object and not inside an array of objects with a string value. – Luiz Jul 17 '18 at 23:29

0 Answers0