title: How to access variable value outside subscribe call back?
body: <p>What is the way to access zvol_name_array after the result of subscribe callback. I am seeing in my Google Dev Tools that, this.zvol_name_array is undefined and I know there is some relevant data in <code>vol_list['vol_name']</code>. </p>
  
  <pre><code>public zvol_name_array: Array&lt;String&gt; = [];
  public zvol_object: Array&lt;object&gt; = [];
  
    ngOnInit() {
      function find_nested_zvol(zvol: any): String {...snip...}
      this.rest.get(this.volume_resource_name , {}).subscribe((res) =&gt; {
        for(let zvol_list of res.data) {
          this.zvol_name_array.push(zvol_list['vol_name']);
        }
      });
  </code></pre>