title: How to filter values of an array inside an array?
body: <p>I will describe the situation for more clarity. I have an array
  like this</p>
  <pre><code>animalsArray = {
  animalID : number,
  animalName: string,
  animalDescription: string,
  
  animalChild: animalsArray[]
  
  }
  </code></pre>
  <p>Now I have to filter these animals using <code>animalName</code> from user input by textfield. Some animals can have n number of <code>animalChild</code> or non at all or <code>animalChild</code> can have another <code>animalChild</code> inside it.</p>
  <p>I already have a code like this</p>
  <pre><code>public animalsArray:animalsArray[]
  
      this.filteredanimalsArray.next(
                  this.animalsArray.filter(item =&gt; (item.animalName.toLowerCase().indexOf(search) &gt; -1))
              );
  </code></pre>
  <p>To filter the main <code>animalsArray</code> and it works fine but the user input doesn't go through the child arrays.</p>
  <p>How can I solve this problem? Thanks in advance</p>