D3.js v4 prepare array for a Pie Chart

Use d3.pie()(data) to prepare an array of numbers for a pie chart.

var data = [1, 1, 2, 3, 5, 8, 13, 21];
    var arcs = d3.pie()(data);

    arcs.forEach(function(element) {
      console.log(element);
    });

This will generate a new array object,

arcs = [
{data: 1, index: 6, value: 1, startAngle: 6.050474740247008, endAngle: 6.166830023713296, padAngle: 0},
{data: 1, index: 7, value: 1, startAngle: 6.166830023713296, endAngle: 6.2831853071795845, padAngle: 0},
{data: 2, index: 5, value: 2, startAngle: 5.817764173314431, endAngle: 6.050474740247008, padAngle: 0},
{data: 3, index: 4, value: 3, startAngle: 5.468698322915565, endAngle: 5.817764173314431, padAngle: 0},
{data: 5, index: 3, value: 5, startAngle: 4.886921905584122, endAngle: 5.468698322915565, padAngle: 0},
{data: 8, index: 2, value: 8, startAngle: 3.9560796378538132, endAngle: 4.886921905584122, padAngle: 0},
{data: 13, index: 1, value: 13, startAngle: 2.443460952792061, endAngle: 3.9560796378538132, padAngle: 0},
{data: 21, index: 0, value: 21, startAngle: 0, endAngle: 2.443460952792061, padAngle: 0}
]