title: How to combine mergeMap observables calls and return just one value for the whole observable
body: <p>I have this scenario in typescript/angular with rxjs 6.5:</p>
  
  <pre><code>   main(){
  
          const properties = ['session', 'user'];
          const source: Observable&lt;any&gt; = from(properties);
  
          source
              .pipe(
                  mergeMap(key =&gt; this.getKey().map((value) =&gt; ({key: key, value: value}))),
                  tap((result) =&gt; {
                      // sending the result elsewhere;
                  }),
              ).subscribe(
              (result) =&gt; {
                  console.log('Final result -&gt;', result);
              }
          );
  
          console.log('\n');
  
      }
  
      getKey(): Observable&lt;any&gt; {
          // Mock function that returns an observable that emits 1 value
          const observable = from(['test']);
  
          return observable;
      }
  </code></pre>
  
  <p>The output is:</p>
  
  <pre><code>Final result -&gt; {key: "session", value: "test"}
  Final result -&gt; {key: "user", value: "test"}
  </code></pre>
  
  <p><strong>1st question:</strong>
  How do I return, <strong>in the most elegant way</strong>, upon subscription on source, just 1 value, with the combined results of the inner observables?</p>
  
  <p>My wanted output, with the subscription in this way (because I want this combined operation to be in the pipe), would be:</p>
  
  <pre><code>(...).subscribe(
  (result) =&gt; {console.log('Final Result:', result}
  )
  
  OUTPUT:
  
  Final result -&gt; [{key: "session", value: "test"}, {key: "user", value: "test"}]
  </code></pre>
  
  <p><strong>2nd question</strong>
  If I don't care about the result of the inner observables, how do I return just 1 value or how do I know when all the inner observables have been completed?</p>
  
  <p>Thanks in advance.</p>