Having issues using RxJS operators the way they were intended to be used.
My endpoint returns Observable<Array<TaskReprintReasonCode>>
I then use the async pipe to subscribe to this observable.
this.reason$ = this.taskService.getTaskReprintReasonCodes();
This works great until i need to filter or map something out of that list of reasons.
this.reasons$ = this.taskService
.getTaskReprintReasonCodes()
.pipe(filter(r => r.reasonDescription === "New"));
I am guessing it has to do with the way I am defining the type coming back from the DB. Is it bad practice to be naming Observabe<INSERTTYPE[]>
this.reasons$ = this.taskService.getTaskReprintReasonCodes().pipe(map(rArray => rArray.filter(r => r.reasonDescription === 'New')))
. – dewwwald