- RxJS Tutorial
- RxJS - Home
- RxJS - Overview
- RxJS - Environment Setup
- RxJS - Latest Updates
- RxJS - Observables
- RxJS - Operators
- RxJS - Working with Subscription
- RxJS - Working with Subjects
- RxJS - Working with Scheduler
- RxJS - Working with RxJS & Angular
- RxJS - Working with RxJS & ReactJS
- RxJS Useful Resources
- RxJS - Quick Guide
- RxJS - Useful Resources
- RxJS - Discussion
RxJS - Join Operator merge
This operator will take in the input observable and will emit all the values from the observable and emit one single output observable.
Syntax
merge(observable:array[]): Observable
Parameters
observable − The input will be an array of Observable.
Return value
It will return an observable with a single value as output.
Example
import { of, merge } from 'rxjs'; import { concat } from 'rxjs/operators'; let list1 = of(2, 3, 4, 5, 6); let list2 = of(4, 9, 16, 25, 36) let final_val = merge(list1, list2); final_val.subscribe(x => console.log(x));
Output
Advertisements