title: How filter a table ( comparing a transformed data using a pipe ) in Angular?
body: <p>I'm trying to filter a Table in Angular using a search box and a custom pipe.
  Some values are showed in the table using pipes like:</p>
  <pre><code> {{order.tot | currency: 'EUR':'symbol':'.2-2':'it' }}
   {{order.datePayment | date: 'dd/MM/yyyy hh:mm:ss' }}
  </code></pre>
  <p>Here the custom pipe:</p>
  <pre><code>export class SearchFilterOrdersPipe implements PipeTransform {
  
    transform(orders, searchValue: string): unknown {
  
      if (!orders || !searchValue) {
        return orders;
      }
  
      searchValue = searchValue.toLocaleLowerCase();
      return orders.filter(order =&gt;
        order.idOrder.toString().includes(searchValue) ||
        order.email.toLocaleLowerCase().includes(searchValue) ||
        order.invoice.toLocaleLowerCase().includes(searchValue) ||
          //  order.datePayment.toString().includes(searchValue) ||
        order.paypalPaymentId.toLocaleLowerCase().includes(searchValue) ||
          //  order.tot.toString().includes(searchValue) ||
        order.status.includes(searchValue)
      )
    }
  }
  </code></pre>
  <p>For all the string values of the table I don't have any problem. But 'tot' and 'datePayment' are originally in the format:</p>
  <ul>
  <li>order.datePayment: 2021-01-13T09:27:11.000Z</li>
  <li>order.tot: 100 or 15.50 or 20</li>
  </ul>
  <p>So I will never catch the right values ( if for example i search the data '17/01/2021' or the tot like 15,50 ).</p>
  <p>Is there some way to transform also in the pipe 'datePayment' and 'tot' before the .includes() ??</p>
  <p>THX.</p>