title: Choose one observable based on condition
body: <p>I am writing an ng2 app and use an application state service based on behavior subjects that expose observables. For the majority of the use cases I want to use observable A to look up a nested object.  I found an odd case where Observable A won't have this data but its in Observable B. Observable A &amp; B are both available from my application state service. </p>
  
  <p>Right now in my component it looks like this</p>
  
  <pre><code>  sharedState: Observable&lt;any&gt;;
  
    constructor(private appStateService: AppStateService) {
      this.sharedState = appStateService.shared$;
    }
  </code></pre>
  
  <p>Then in my view : </p>
  
  <pre><code>&lt;div&gt;{{ (sharedState | async)?.loadedAccountDetails?.accountId }}&lt;/div&gt;
  </code></pre>
  
  <p>As one example. What I imagine I need to do now in the component is:</p>
  
  <ol>
  <li>Subscribe to Observable A and check if it has my loadedAccountDetails and account Id etc</li>
  <li>If A doesn't have this value then go with B </li>
  </ol>
  
  <p>What I was hoping to do in the component as well was only expose/have one instance variable that is an Observable so that I can keep my view/html the same.</p>
  
  <p>Even if you are unfamiliar with Angular 2 I can work on that but need help understanding how to almost implement an if statement with observables.   </p>