title: Define condition with Parent and Children classes after filter is applied
body: <p>In Angular 8 I have an Observable:</p>
  
  <pre><code>let parents: Observable&lt;Parent[]&gt;;
  </code></pre>
  
  <p>Where <code>Parent</code> and <code>Child</code> classes are:</p>
  
  <pre><code>class Parent {
    id: number;
    name: string;
    children: Child[];
  }
  
  class Child {
    id: number;
    name: string;
  }
  </code></pre>
  
  <p>I need to find the <code>Child</code>, across all parents' children, which <code>id</code> value is 1.</p>
  
  <p>Then I need to define a condition with that <code>Child</code> and its <code>Parent</code> ... I tried:</p>
  
  <pre><code>  parents.pipe(
      map(parents =&gt; parents.map(parent =&gt; parent.children)),
      map(children =&gt; children.find(child =&gt; child.id == 1))
      map(child =&gt; Test Condition with resulting Child and its Parent 
  </code></pre>
  
  <p>The first problem I encountered is that <code>children</code> in <code>map(children =&gt;</code> is of type <code>Child[][]</code> and not <code>Child[]</code> so the expression <code>child.id</code> fails as child is <code>Child[]</code>.</p>
  
  <p>And in the last map I need to have the <code>Child</code> but also its <code>Parent</code> so I can create the condition and return an <code>Observable&lt;boolean&gt;</code></p>
  
  <p>How can I do this? Can't be done with map?</p>