merge in rxjs

questionsmerge in rxjs
Suhash asked 3 years ago

how can i use merge in RXJS? explain MERGE in RXJS with example.

2 Answers
admin Staff answered 3 years ago
Here is example of merge in rxjs.

const first = Rx.Observable.from([1,2,3]); const second = Rx.Observable.from([6,7,8,9]); Rx.Observable.merge( first, second ).subscribe(dd=>{console.log(dd)})

For more details you can visit here


shyam answered 3 years ago

You can use merge with array of object like this
const first = Rx.Observable.from([{“name”:”san”, “email”:”“},
{“name”:”shyam”, “email”:”“}])
const second = Rx.Observable.from([
{“name”:”shya”, “email”:”“,”mob”: “96xxxxxx47”}])
first, second