title: Using Firebase-util to resolve one to many relationship
body: <p>I've been looking at the firebase util project at <a href="https://firebase.github.io/firebase-util/" rel="nofollow">https://firebase.github.io/firebase-util/</a>.  I can't figure out if this is possible.</p>
  
  <p>Say I have a data set like this:</p>
  
  <pre><code>{ clients:
     { client1: { groups: { group1: true, group2: true }, name: 'client1' },
       client2: { groups: { group3: true, group4: true }, name: 'client2' } },
    groups:
     { group1: { name: 'group1' },
       group2: { name: 'group2' },
       group3: { name: 'group3' },
       group4: { name: 'group4' },
       group5: { name: 'group5' } } }
  </code></pre>
  
  <p>I want to retrieve "client1" and resolve all the groups associated with client1, giving me back a dataset like this.</p>
  
  <pre><code>{ client1: { groups: { group1: { name: 'group1' }, group2: { name: 'group2' } }, name: 'client1' }
  </code></pre>
  
  <p>Is there a way to do this with Firebase-util?</p>
  
  <p>There is an example on the website that is similar, where it is joining an account to a profile and then mapping the style to another reference point.</p>
  
  <pre><code>var ref = Firebase.util.join(
      new Firebase('INSTANCE/account'),
      {
         ref: new Firebase('INSTANCE/profile'),
         keyMap: {
            name: 'name',
            nick: 'nick',
            style: new Firebase('INSTANCE/styles')
         }
      }
  );
  </code></pre>
  
  <p>But, I'm not seeing how to do it with what I'm looking for.</p>
  
  <p>Something like:</p>
  
  <pre><code>FirebaseUtil.join(
    { ref: new Firebase('INSTANCE/clients/client1'), keyMap: {name: 'name', groups: new Firebase('INSTANCE/groups')} }
  )
  </code></pre>
  
  <p>Thanks for any hints!</p>