How to execute getactive session function before compare excel function angular 8?

I work on angular 8 i have two subscribe
i need to execute first subscribe and after finish
execute second subscribe
but i don’t know how to make it please ?
first function i need to execute is

second function i need to execute it
so how to do that please ?

What I have tried:

execute it first
this._dataService.getActiveSessions(flagButton).subscribe(resp => {
      if (resp) {
        alert('There are active session working')
      } else {

execute it second

      .subscribe(blob => {
      saveAs(blob.body, +'.xlsx');

You can chain operators in rxjs: RxJS documentation for operators.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.