Filter operator

In contrast with the map operator, the filter may produce fewer elements than it has received. It only emits those elements that have successfully passed the predicate test, as shown in the following diagram:

Diagram 2.8 Filter o perator: emits only those items from an Observable that pass a predicate test