I've been working on a solution to connect multiple operations within a map function that follows the flatMap operator.
Here's how it currently functions:
flatMap(
someResponse => combineLatest([
this.locator.function(someResponse, variable2),
this.function1(someResponse),
])
),
map(([response1, response2]) => this.function3(response1, response2));
The new functionality I aim for is as follows:
flatMap(someResponse =>
combineLatest([
this.locator.function(someResponse, variable2),
this.function1(someResponse),
this.locator.function2(someResponse, variable3)
])
),
map(([response1, response2, response3]) => {
this.function3(response1, response2);
this.function4(response3);
})
I attempted using another map, but it retrieved the previous map response instead of the flatMap. My understanding of each of these operators like switchMap, concatMap, mergeMap, etc., isn't entirely solid. Hence, I couldn't figure out a way to achieve this.
In the flatMap, I've linked and merged three functions, and now I wish to utilize the responses for additional operations.
Can someone guide me on accomplishing this task?