angulars pipeable operators
I am not entirely sure what you mean by angulars pipeable operators. You have the tag rxjs-pipeable-operators in your question, so I expect you mean rxjs operators in general.
So I make the assumption on what you actually want to do. Please leave a comment if I missunderstood.
You have a service which returns an Observable from an array. Something like this:
function getMyData(): Observable<any[]> {
return Observable.create(observer => {
observer.next([
{ name: 'value 1', id: 1 },
{ name: 'value 2', id: 2 },
{ name: 'value 3', id: 3 }
]);
});
}
If you want to modify the value in this observable stream, you cannot use filter or find on the stream directly. The value you receive is the full array, so the find operation is executed on the array object and not the individual items. What you want to do is to map the resulting value and filter it in the mapping function.
getMyData()
.map((theArray: any[]) => theArray.find(item => item.id === 2))