map
연산자(operator) 정의: map(project: Function, thisArg: any): Observable
Apply projection with each value from source.
Examples
Example 1: Add 10 to each number
( jsBin | jsFiddle )
const source = Rx.Observable.from([1,2,3,4,5]);
const example = source.map(val => val + 10);
const subscribe = example.subscribe(val => console.log(val));
Example 2: Map to single property
( jsBin | jsFiddle )
const source = Rx.Observable.from([{name: 'Joe', age: 30}, {name: 'Frank', age: 20},{name: 'Ryan', age: 50}]);
const example = source.map(person => person.name);
const subscribe = example.subscribe(val => console.log(val));
Additional Resources
Source Code: https://github.com/ReactiveX/rxjs/blob/master/src/operator/map.ts