Map and Filter Operators of Sequencing

Learn to use map and filter operators in sequencing.

We'll cover the following

Among the dozens of operators that can transform Observables in RxJS, the most used are those that any language with decent collection-processing abilities also have: map, filter, and reduce. We will cover only the map and filter operators in this lesson and the rest in the next lesson. In JavaScript, we can find these operators in array instances.

RxJS follows JavaScript conventions, so we’ll find that the syntax for the following operators is almost the same as the one for array operators. In fact, we’ll show the implementation using both arrays and Observables to show how similar the two APIs are.

Map

The map operator is the most commonly used sequence transformation operator. It takes an Observable and a function and applies that function to each of the values in the source Observable. It returns a new Observable with the transformed values.

Get hands-on with 1200+ tech skills courses.