Angular 2 - How would you subscribe multiple variables?
<p>Using Angular 2, I receive JSON data from a service. Something like this:</p>

<pre><code>{
    "customerName": "foo",
    "customerAddress": "123 Somewhere",
    "products": 
    [
        {
            "productName": "bar",
            "productNumber": 123 
        },
        {
            "productName": "baz",
            "productNumber": 456             
        }
    ]
}
</code></pre>

<p>In my component I subscribe to the service to get populate <code>customerData</code>.</p>

<pre><code>private _getData() {
    this._myService
        .getData()
        .subscribe(
            customerData =&gt; this.customerData = customerData,
            error =&gt; this.errorMessage = error
        );
}
</code></pre>

<p>This code works correctly.</p>

<p>In the JSON dump there are two data "groupings", the customer data and the product data, the latter in the array. Ideally I'd like to populate the product data separately. Something like this: </p>

<pre><code>        .subscribe(
            customerData =&gt; this.customerData = customerData,
            productData =&gt; this.productData = customerData.products
            error =&gt; this.errorMessage = error
        );
</code></pre>

<p>Is this possible, and if so how would I code the subscription?</p>