title: Alter array of objects into array with co-ordinates for chart
body: <p>Learning JavaScript. I need to plot some data (I'm using Nivo).</p>
  
  <p>I have data from my API in the format of:</p>
  
  <pre><code>[{"as_at_date":"2020-02-21","value":815202269.5,"num":139},{"as_at_date":"2020-02-25","value":809209302.32,"num":139},{"as_at_date":"2020-03-12","value":723686212.35,"num":139},{"as_at_date":"2020-03-13","value":734798809.24,"num":139},{"as_at_date":"2020-03-16","value":701366943.2,"num":139},{"as_at_date":"2020-03-17","value":710833514.89,"num":139},{"as_at_date":"2020-03-18","value":699154469.83,"num":139},{"as_at_date":"2020-03-19","value":694649684.34,"num":139},{"as_at_date":"2020-03-20","value":685400033.9,"num":139}]
  </code></pre>
  
  <p>To plot a line chart with Nivo I need to alter the above array into:</p>
  
  <pre><code>    [{"id": 'XXXXX",
  "data": [{"x":"2020-02-21","y":815202269.5},{"x":"2020-02-25","y":809209302.32},{"x":"2020-03-12","y":723686212.35},{"x":"2020-03-13","y":734798809.24},{"x":"2020-03-16","y":701366943.2},{"x":"2020-03-17","y":710833514.89},{"x":"2020-03-18","y":699154469.83},{"x":"2020-03-19","y":694649684.34},{"x":"2020-03-20","y":685400033.9}]
  </code></pre>
  
  <ul>
  <li>Ignore "num" property.</li>
  <li>nest the data and create an "id"</li>
  <li>Change as_at_date to "x", value to "y"</li>
  </ul>
  
  <p>Last attempt was trying to use .map like <code>.map(item =&gt; [{"x": item['as_at_date']}, {"y": item['value']}])</code> but wasn't quite right.</p>
  
  <p>Appreciate any help, thanks!</p>