title: Rxjs append string to an observable?
body: <p>I'm not really sure what the title of this post should be because I'm not sure what will accomplish it just yet.  I'm creating a simple ngx chart (bar graph) that displays the number of accounts in a given step.  I'm pulling the data from Firestore.  It's logging the number of accounts just fine but I need to also pass the step its corresponding to which is where I'm stuck.  The format of the data needs to be an array of name, value objects.  Here is my code.  Any help on this would be greatly appreciated.</p>
  
  <pre><code>import { Account } from './../../../models/account.model';
  import { ChartService } from './../../../services/chart.service';
  import { Component, OnInit } from '@angular/core';
  import { Observable } from 'rxjs/Observable';
  import { BehaviorSubject } from 'rxjs/BehaviorSubject';
  import { map } from 'rxjs/operator/map';
  import 'rxjs/add/observable/from';
  import 'rxjs/add/operator/switchMap';
  import 'rxjs/add/operator/combineAll';
  
  @Component({
    selector: 'app-steps-chart',
    templateUrl: './steps-chart.component.html',
    styleUrls: ['./steps-chart.component.css']
  })
  export class StepsChartComponent implements OnInit {
    steps = ['A', 'PA', 'PS', 'CI', 'CN'];
    steps$;
    chartData = [];
    count = 0;
  
    colorScheme = {
      domain: ['#03a9f4', '#009688', '#f29706', '#673ab7', '#f44336']
    };
  
    // options
    showXAxis = true;
    showYAxis = true;
    gradient = false;
    showLegend = true;
    showXAxisLabel = true;
    xAxisLabel = 'Steps';
    showYAxisLabel = true;
    yAxisLabel = 'Accounts';
  
    constructor(private chartService: ChartService) { }
  
    ngOnInit() {
      this.steps$ = Observable.from(this.steps);
  
      this.chartService.getAccounts().switchMap(() =&gt; {
        const accounts$ = this.steps$.map(step =&gt; {
          return this.chartService.getAccountsByStep(step);
        });
        const combined$ = accounts$.combineAll();
        return combined$;
      }).map(accounts =&gt; {
        console.log(accounts);
        return accounts.map(a =&gt; {
          return {
            'name': step, // need to figure out how to get step
            'value': a.length
          };
        });
      })
      .subscribe(data =&gt; {
        console.log(data);
      });
    }
  
  }
  </code></pre>