In the `angular` project, i have `rxjs` `filter` through which i am not able to filter records. My function is here

```
public getOrders(type: string, filterObj = {}, otherParams = {}): Observable<{ name: string; qt: number }[]> {
   return this.http.get(apiUrl, { params: { filter: JSON.stringify(filterObj), ...otherParams},
   })
   .pipe(map((res: any) => res.payload))
   .pipe(filter((order: any) => order.name && /\S/.test(order.name)));
}

```

It's not filtering the records. It's not returning any values.

But if i do like this so it's working correctly.

```
public getOrders(type: string, filterObj = {}, otherParams = {}): Observable<{ name: string; qt: number }[]> {
   return this.http.get(apiUrl, { params: { filter: JSON.stringify(filterObj), ...otherParams},
   })
   .pipe(map((res: any) => res.payload.filter((order: any) => order.name && /\S/.test(order.name))))
}

```

what's going wrong here?