I'm trying to filter episodes with switchMap
& filter
:
this.getEpisodesForStoryEvents()
.switchMap(episodes => Observable.from(episodes))
.filter((episode: Episode) => {
return episode.ref.startsWith('SE/8');
})
.toArray()
.subscribe(episodes => {
console.log(episodes);
});
But when using toArray
, it doesn't work anymore, I don't subscribe to anything :/