Is it possible to apply a filter inside another filter in this scenario? I have a table of orders with nested tables of services, and I want to only display the orders where the type of service is 'type1'. I tried using the following line of code but it didn't work:
.pipe(map(orders => orders.filter(order => order.services.map(services => services.type === 'type1'))));
orders = [{ 0: id: 1 rejected: false services: (2) [{ type: 'type1' }, { type: 'type2' }] 1: id: 2 rejected: false services: (2) [{…}, {…}] }]