title: AngularFire query denormalised data
body: <p>i'm having some problem querying my data with firebase.</p>
  
  <p>I have the below structure
  <a href="https://i.stack.imgur.com/hL4qQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hL4qQ.png" alt="enter image description here"></a></p>
  
  <p>The user has some pets and i want to get a list of all pets the user has in the pets node.
  I did the following approach:</p>
  
  <pre><code>for (let petUID in this.user.pets) {
     this.af.database.object("/pets/" + petUID ).subscribe(data =&gt; {
        this.ownPets.push(data);
     });
  }
  </code></pre>
  
  <p>At the end i get all the pets in my <code>ownPets</code> variable.
  But it just like awkward to me this approach.</p>
  
  <p>If any data is updated in the pets node from a pet that is inside the <code>ownPets</code> array, this pet is pushed again and i get the outdated and the new pet inside the <code>ownPets</code>.</p>
  
  <p>I tried another approach: use the query method and send an array of objects in the <code>equalTo</code> but i get an error saying i can't send an array of objects.</p>
  
  <pre><code>this.af.database.list('/pets', {
      query: {
        orderByChild: "name",
        equalTo: ["pet1", "pet2"]
      }
    }).subscribe (data =&gt; {
      console.log(data);
  });
  </code></pre>
  
  <p>Anyone have a better approach i can use?
  Thanks</p>