I am wondering if I can get help on some behavior I'm unsure about. In my code below, clients.forEach() gives an error, I assume because it executes at the same time as the forkJoin(). So clients is empty. Is there a way to have the next code "wait" for the forkJoin() function to complete first, without having to put the clients.forEach() inside the subscription() function. The clients.forEach() code is actually quite long and messy.
forkJoin({
xclients: this.clients$,
xkycMetrics: this.clientsBySHID$
}).subscribe(({xclients, xkycMetrics}) => {
clients = xclients,
kycMetrics = xkycMetrics
});
// Client Data
clients.forEach(client => {......});