I am currently working with two functions:
this.initData(resp.Id, "")
this.initSelection(resp.results)
My requirement is for the initSelection function to only fire after the initData function has completed, thus making initSelection function wait for initData to finish.
This is my approach to achieve this:
of(this.initData(resp.results.communityId)).subscribe(()=>this.initCustomerSelection(resp.results))
Unfortunately, the above code is not fulfilling the requirement.
How can I modify it so that the initSelection function waits for the completion of initData?