title: Array of objects transformation in javascript
body: <p>I have an array of objects:</p>
  
  <pre><code>    let arr = [{start: 1, end: 5, group: [1, 3, 5]},
      {start: 12, end: 17, group: [6, 20,]}]
  </code></pre>
  
  <p>I need to transform this array into :</p>
  
  <pre><code>    let arr_transformed = [{start: 1, end: 5, group: 1},
      {start: 1, end: 5, group: 3},
      {start: 1, end: 5, group: 5},
      {start: 12, end: 17, group: 6},
      {start: 12, end: 17, group: 20}
      ]
  </code></pre>
  
  <p>Basically I need to copy objects values(start, end) with number of elements in group object and put single group number to it.</p>