title: Filter on multiple columns using one pipe angular 2
body: <p>I am trying to filter <code>Array</code> data based on multiple columns using only one <code>Pipe</code>. Right now, It filters first column value. Please check my below code and help me to sort this out.</p>
  
  <p><strong>My Code:</strong></p>
  
  <pre><code>@Pipe({ name: "dataFilter", pure: false })
  export class DataFilterPipe implements PipeTransform {
      transform(value: Array&lt;any&gt;, filter: any[]) {
          if (!filter) {
              return value;
          } else if (value) {
              return value.filter(item =&gt; {
                  for (var i = 0; i &lt; filter.length; i++) {
                      if (filter[i][1] == undefined) {
                          return true;
                      } else if ((typeof item[filter[i][0]] === 'string' || item[filter[i][0]] instanceof String) &amp;&amp;
                          (item[filter[i][0]].toLowerCase().indexOf(filter[i][1]) !== -1)) {
                          return true;
                      }
                      return false;
                  }
              });
          }
      }
  }
  </code></pre>
  
  <p>I am passing data like <code>dataFilter : [['column1',value1],['column2',value2],['column3',value3]]</code>.</p>