title: Create chart using json data
body: <p>I have below JSON data through which I am trying to create line chart using <a href="http://jtblin.github.io/angular-chart.js/" rel="nofollow noreferrer">AngularJS</a> . However using map function, I am able to get the <code>$scope.labels</code> but not able to form <code>$scope.series</code> and <code>$scope.data</code>.</p>
  
  <p>Here is my JS code: </p>
  
  <pre><code>var source = [
    {"DE":2,"NP":20,"BD":28,"TW":1,
    "end_time":"2016-07-05T07:00:00+0000","date":"01-01-2011"},
    {"DE":5,"NP":11,"BD":22,"BE":2,"FJ":2,
    "end_time":"2016-07-06T07:00:00+0000","date":"01-09-2011"},
    {"DE":5,"NP":24,"BD":29,
    "end_time":"2016-07-07T07:00:00+0000","date":"01-11-2011"}
  ]
  var $scope = {};
  $scope.labels = [];
  $scope.data = [];
  $scope.series = [];
  
  
  source.forEach(function(item){
    $scope.labels.push(item.end_time)
  })
  </code></pre>
  
  <p>How to fetch data from JSON to form series like below and data.</p>
  
  <pre><code>$scope.series = ["DE","NP","BD","TW"]
  
  $scope.data = [] ---&gt; //Stuck here in forming data
  </code></pre>
  
  <p><a href="https://jsfiddle.net/obcy91zs/1/" rel="nofollow noreferrer">JSfiddle</a></p>