title: D3.js create new array with nest() values
body: <p>I am studying d3.js now and I want to set my dataset for timeseries in js to make a line chart.</p>
  
  <p>I want to group every local and make an array for those occurrence and plot them by date</p>
  
  <p>Right now this is my output</p>
  
  <pre><code>Object {0: Object, 1: Object, 2: Object, 3: Object, 4: Object…}
  0: Object
  date: "2020-03-08"
  local: "MG"
  occurrence: 1
  1: Object
  date: "2020-03-09"
  local: "MG"
  occurrence: 2
  2: Object
  date: "2020-03-11"
  local: "BH"
  occurrence: 1
  </code></pre>
  
  <p>But I want to set like this</p>
  
  <pre><code>Object{
  entries: Array(n) [0: Object {local: "MG", occurrence: Array{1, 2, ..}, 1: Object {local: "BH", occurrence: Array{1 ...}]
  date: Array(d) [0: 2020-03-08, 1: 2020-03-09, ...]
  }
  </code></pre>
  
  <p>I am trying to use nest() and rollup() but I want an array with all occurrences but I dont know how to access it because its inside <code>values</code> and then inside <code>occurrence</code></p>