title: using the map operator using Observables
body: <p>Below I do a map after subscribe, but I would like to use the map operator instead. Can anyone point me in right direction?</p>
  
  <pre><code>  getChildren(node: any) {
      this.filter = {
        codedName: node.id
      };
      this.eclassService.getEclassNodes(this.filter)
      .subscribe(data =&gt; {
        console.log("data", data);
        data.map(child =&gt; {
          this.children.push({
            id: child.codedName,
            name: `${child.codedName} ${child.preferredName}`,
            hasChildren: true
          });
        });
      });
      // return this.asyncChildren.map((c) =&gt; Object.assign({}, c));
      return this.children.map((c) =&gt; Object.assign({}, c));
    }
  </code></pre>