title: Reading JSON into arrays in Angular (HttpClient)
body: <p>i am trying to read JSON into different arrays using HttpClient for the use in Echarts, but since i am a newbie i couldn't find how to fill JSON into the different arrays.</p>
  
  <p>the part code i used so far was:</p>
  
  <pre><code>....
       label: Array&lt;any&gt;;
       data: Array&lt;any&gt;;
       tooltip: Array&lt;any&gt;;
  
        constructor(private http: HttpClient) {
                this.getJSON().subscribe(data =&gt; {
                this.data=data.data;
                this.label=data.label;
                this.tooltip=data.tooltip;
                console.log(data)
            });
        }
  
        public getJSON(): Observable&lt;any&gt; {
            return this.http.get("./assets/JSONData/TeamProgress.json")
        }
  </code></pre>
  
  <p>the JSON file is formatted like this:</p>
  
  <pre><code>    [{"label":"0","data":"0","tooltip":"0"},
  {"label":"1","data":"-1","tooltip":" tooltip1"},
  {"label":"2","data":"-1","tooltip":" tooltip2"},
  ...etc
  </code></pre>
  
  <p>i want to be able to get all labels of JSON in one array, and all data in another array, and all tooltips in a third array.</p>
  
  <p>it would be great if you can help me.</p>
  
  <p>thanks</p>