title: Angular firestore array_contains on objects
body: <p>I have the following document:</p>
  
  <pre><code>{
      "ID" : "01",
      "Name" : "A1",
      "players" : [ {
          "active" : false,
          "name" : "dissident"
        }, {
          "active" : false,
          "name" : "ink"
        }
      ]
  }
  </code></pre>
  
  <p>Wrote it down in JSON so it's easier to understand.
  Now what I want to do with firestore is query on the players[*].name.
  I have seen the new option to use "array_contains".</p>
  
  <p>But I have seen all examples use an array of string instead of an array of objects.
  Is it possible to query over the players[*].name?</p>
  
  <p>This is what I tried:</p>
  
  <pre><code>this.afs.collection('Locations', ref =&gt; ref.where('players.name', 'array-contains', _name))
  </code></pre>
  
  <p>Based on @camden_kid reaction I build:</p>
  
  <pre><code>this.locationsCollection = this.afs.collection('Locations', ref =&gt; ref.where('players', 'array-contains', {active : false, name : _name}) );
  if(this.locationsCollection === undefined){
      this.locationsCollection = this.afs.collection('Locations', ref =&gt; ref.where('players', 'array-contains', {active : true, name : _name}) );
  }
  </code></pre>
  
  <p>But this is depended on the active value to, this will not work on every kind of situation.</p>