Question - What is the use of mergeMap?
Answer -
mergeMap os also known as flatmap, which is used for flattening an inner observable and also in controlling the number of inner subscription.It also helps in maintaining multiple active inner subscription at once.
It starts emitting the values from replacing the original values and it does not cancle any of the inner observables.
Here is an example of mergeMap:
mergeMap(project: (value: T, index: number) => O): OperatorFunction>