title: Angular Material table filter with nested object
body: <p>I have two Arrays in my object which leads to the case, that I can actually filter for one Array, but not the second one.</p>
  
  <p>This is my filter predicate which works fine for the district array, but not for the array propertyType. Does someone has an idea how I filter for the second array too?</p>
  
  <pre><code>this.dataSource.filterPredicate = (data, filter: string)  =&gt; {
    const accumulator = (currentTerm, key) =&gt; {
      return key === 'district' ? currentTerm + data.district.name : currentTerm + data[key];
    };
    const dataStr = Object.keys(data).reduce(accumulator, '').toLowerCase();
    // Transform the filter by converting it to lowercase and removing whitespace.
    const transformedFilter = filter.trim().toLowerCase();
    return dataStr.indexOf(transformedFilter) !== -1;
  };
  </code></pre>
  
  <p>Interface</p>
  
  <pre><code>export interface Property {
     city: string;
     description: string;
     district: District; &lt;-- here
     efficiencyRating: EfficiencyRating; &lt;-- here
     houseno: string;
     id: number;
     name: string;
     propertyType: PropertyType; &lt;-- here 
  }
  </code></pre>