title: Angularfire2, mergin data from two endpoints
body: <p>Hello and thanks in advance,</p>
  
  <p>I have 2 end points in my firebase</p>
  
  <p>1: /projects (holds a list of projects)</p>
  
  <p>2: /project-attachments/{projectID} (returns all attachments for 'projectID)</p>
  
  <p>I can't figure how to efficiently merge the project-attachments data to the project.</p>
  
  <p>I would technically like to end up with an array of projects, and each project with its attachments</p>
  
  <pre><code>[
    {
        name : 'Project 1',
        attachments : [
          { 
            name : 'Attachment 1 name',
            value: 'value 1'
          },
          { 
            name : 'Attachment 2 name',
            value: 'value 2'
          }
        ]
    },
  
    {
        name : 'Project 2',
        attachments : [
          attachment-key1 : { 
            name : 'Attachment name',
            value: 'value 1'
          },
          attachment-key2 : { 
            name : 'Attachment name',
            value: 'value 2'
          }
        ]
    }
  
  ]
  </code></pre>
  
  <p>I have tried various rxjs operators like combineLatest or mergeMap etc. but I end up doing a lot of looping withing the operators which seems like overkill.</p>
  
  <p>Any help is greatly appreciated.</p>