Pipe filter based on two or more attributes value in Angular2
<p>If I have an array of objects like </p>

<pre><code> [
   {name: 'aaa', type: 'A'},
   {name: 'aaa', type: 'B'},
   ....
 ]
</code></pre>

<p>How can I create a filter using pipe inside ngFor expression, something like</p>

<pre><code>*ngFor='let obj of array | filter:name[nameValue]:type[typeValue]
</code></pre>

<p>Here, <code>name[nameValue]</code>  name is a property, <code>nameValue</code> is its value.
only show the objects which match the nameValue in name property and typeValue in type property simultaneously.</p>

<p>I Want a more generalized filter which takes any <code>property[propertyValue]</code> and can filter output accordingly.</p>