title: Check firebase for an existing object based on attributes, prevent duplicates
body: <p>I want to check my firebase to see if I already have an object stored that matches two attributes. To put this question into context, imagine an app that just stores songs, with attributes like 'artist' and 'songname' and some more, like this: </p>
  
  <pre><code>var wishlist = new Firebase('https://myurl.firebaseio.com/wishes');
  
  wishlist.push({
     'artist': artist,
     'song': song,
     'likes': 0
  });
  </code></pre>
  
  <p>I want to prevent object creation at this point if an object with the same artist AND songname already exists. How do I check for that? The documentation doesn't seem to provide an example for that since they only point out cases that directly reference a name. My object names are auto generated, I read them in the callback with <code>snapshot.name();</code>.</p>
  
  <p>Can or should I do this using the security rules in the firebase backend or check for it on the client side already?</p>
  
  <p>Thanks a lot for any clues :)!</p>