How do I get the value set in the "subscribe" outside of it :
MyComponent.ts
 getLabelTypeOfDemandByCode(code: string) {
        const label;
        this.adminService.getLabelByCode(code).subscribe(
          labelByCode => {
            label = labelByCode.label;
            localStorage.setItem(code, JSON.stringify(labelByCode.label));
          });
         // Here when I check the value of label it is null
        console.log(label); // ==> null
        // Or when I try to get value of local storage 
        console.log(JSON.parse(localStorage.getItem("ABI")); // it is null
      }
How can I get the value outside the subscribe ?
