title: Angular - How can i transform an Object into an Array
body: <p>I'm working on a line chart of ChartJS library.
  I have this object and I would like to transform it in an array, because I want to use its data on it.
  Searching on the net I found that map it's the easiest way to do that but I can't actually use it on Object, but only on arrays. How can i convert it in an array or simply use the json data on the line chart? That's the json object i have right now.</p>
  <pre><code>{labels: Array(2), values: Array(2)}
  labels: (2) [&quot;sales-be&quot;, &quot;sales-mw&quot;]
  values: (2) [48, 8]
  </code></pre>
  <p>i tried like this but it gives me errors:</p>
  <pre><code>var labels = this.errorsList.map(function (e) {
        return e.labels;
      });
  
      var datas = this.errorsList.map(function (e) {
        return e.values;
      });
  </code></pre>
  <p>TypeError: this.errorsList.map is not a function</p>