title: Observable with multiple MatTableDataSource
body: <p>I have an angular 6 application which displays multiple mat-tables in a page. 
  Here is how the json looks like.</p>
  
  <pre><code>"job-detail": 
      {
        "JobId": "480960",
        "jobDocMetadata":
          [
              {
                  "seq": "1",
                  "docID": "524126",
                  "type": "Print",
                  "title": "Sample"               
              },
              {
                  "seq": "2",
                  "docID": "524125",
                  "type": "Print",
                  "title": "Sample"               
              }           
          ],
          "jobStatusHistory":
          [
              {
                  "date": "12-04-2018 12:47:16 CST",
                  "code": "200",
                  "jobStatus": "Job Undergoing Composition",
                  "description": "received a new job"
              },
              {
                  "date": "12-04-2018 12:48:14 CST",
                  "code": "315",
                  "jobStatus": "Job successfully delivered",
                  "description": "job finished,"
              }           
          ],
          }
  </code></pre>
  
  <p>I'm trying to display the data from jobDocMetadata and jobStatusHistory in 2 separate mat-tables in the same page.
  Here is the service which gets the data from a rest service.</p>
  
  <pre><code>findJobDetail(jobID: number): Observable&lt;JobDetail&gt; {
      return this.httpClient.get&lt;JobDetail&gt;(`${this.JOB_DETAIL_URL}`, customHttpOptions).pipe(
        tap(_ =&gt; this.log(`Found Job`)),
        catchError(this.handleError&lt;any&gt;('findJobDetail')),
      );
    }
  </code></pre>
  
  <p>And this is the component code so far, subscribing to the observable and it's working fine.        </p>
  
  <pre><code>     public jobDetailObs: Observable&lt;JobDetail&gt;;
       public jobDetail: JobDetail;
       jobDocMetadataDS: MatTableDataSource&lt;JobDocMetadata&gt;;
       jobStatusHistoryDS: MatTableDataSource&lt;JobStatusHistory&gt;;
       @ViewChildren(MatSort)
       sort = new QueryList&lt;MatSort&gt;();
  
        this.apiService.findJobDetail(this.id).subscribe(
        data =&gt; {
          this.jobDetail = data as JobDetail;
  
          this.jobDocMetadataDS = new MatTableDataSource(this.jobDetail.jobDocMetadata);
          this.jobDocMetadataDS.sort = this.sort.toArray()[0];
  
          this.jobStatusHistoryDS = new MatTableDataSource(this.jobDetail.jobStatusHistory);
          this.jobStatusHistoryDS.sort = this.sort.toArray()[1];
               }
          )
  </code></pre>
  
  <p>Here is the template sample.</p>
  
  <pre><code>&lt;h2 class="mat-h2 subheader"&gt;Job Document Metadata&lt;/h2&gt;
      &lt;div class="mat-elevation-z8"&gt;
          &lt;mat-table #table [dataSource]="jobDocMetadataDS" matSort&gt;
              &lt;ng-container matColumnDef="seq"&gt;
                  &lt;mat-header-cell *matHeaderCellDef mat-sort-header&gt; Seq &lt;/mat-header-cell&gt;
                  &lt;mat-cell *matCellDef="let row"&gt; {{row.seq}}&lt;/mat-cell&gt;
              &lt;/ng-container&gt;
              &lt;ng-container matColumnDef="docID"&gt;
                  &lt;mat-header-cell *matHeaderCellDef mat-sort-header&gt; Doc ID &lt;/mat-header-cell&gt;
                  &lt;mat-cell *matCellDef="let row"&gt; {{row.docID}}&lt;/mat-cell&gt;
              &lt;/ng-container&gt;
  </code></pre>
  
  <p>I'm trying to modify this code to use async pipes, since it has been prefered over subscribing to an observable.  For this, I'm trying to bind my datasources to the Observable.</p>
  
  <pre><code>this.jobDetailObs = this.apiService.findJobDetail(this.id).pipe(share());
  </code></pre>
  
  <p>So my question is how can I bind 2 datasources to an Observable of JobDetail.
  I couldn't bind Observable directly to the data source since the data I need is inside JobDetail. So I'm thinking to convert the Observable of JobDetail to a JobDetail object (jobDetailObs to jobDetail) to achieve this mapping. Is this the best way to do it and if so, how can I achieve it ?</p>