title: Convert list of array to array of object
body: <p>I use angular CLI 6 and firebase. I obtain in type script this list of array ;       </p>
  
  <pre><code>(3) [Array(5), Array(5), Array(5)]
       0 : (5) ["Chimiothérapie", "rettreret", 4, 1534716000000, 1535061600000]
       1 : (5) ["Chimiothérapie", "trferterteretretetr", 3, 1535061600000, 1535320800000]
       2 : (5) ["Chimiothérapie", "zrteretetrertertgerter", 4, 1534370400000, 1534716000000]
       length: 3__proto__ : Array(0)
  </code></pre>
  
  <p>I want to convert the first one to this type of object :</p>
  
  <pre><code>(3) [Ppsplan, Ppsplan, Ppsplan]
   0 : Ppsplan {typetraitement: "Chimiothérapie", acte: "rettreret", duree: 4, datedebut: 1534802400000, datefin: 1535148000000}
   1 : Ppsplan {typetraitement: "Chimiothérapie", acte: "trferterteretretetr", duree: "", datedebut: 1534111200000, datefin: 1534111200000}
   2 : Ppsplan {typetraitement: "Chimiothérapie", acte: "zrteretetrertertgerter", duree: 3, datedebut: 1535493600000, datefin: 1535493600000}
  length :3
   __proto__ :Array(0)
  </code></pre>
  
  <p>I try this : </p>
  
  <pre><code>this.ppssToDisplay2 = this.ppssService.getSinglePPS2(this.key);
  this.ppssToDisplay2.subscribe((ppsList: PPS[]) =&gt; {
      console.log(ppsList);
  
      let data =[];
  
      ppsList.map((pps: PPS) =&gt; {
          Object.keys(pps.ppsplan)
              .forEach(key =&gt; {
                  let ppsplan: Ppsplan = pps.ppsplan[key];
                  data.push([ ...interestingFields.map(field =&gt; ppsplan[field]) ]);
  
                  const convert_data= (list: any[]) =&gt; new Ppsplan(...list);
                  let ppsplans = [];
                  for (let list of data) {
                      ppsplans.push(convert_data(list));
                  }
              });
  
          console.log(this.ppsplans);
      });
  });
  </code></pre>
  
  <p>ERROR : expect 3 - 5 argument but got 0 </p>
  
  <p>Ppsplan in my interface : </p>
  
  <pre><code>export class Ppsplan {
    constructor(public typetraitement:string, public acte:string, public duree:number, public datedebut = new Date() , public datefin = new Date() ) {}
  }
  </code></pre>