'Adding an empty object between each line in a typescript array

I'm creating an iterator with the .map() function like so:

var csv = this.invoices
  .map(x => ({
    invoiceId: x.invoiceId,
    invoiceDate: x.invoiceDate,
    invoiceType: x.invoiceType,
    amount: x.subtotal,
  }));

I'm going to be exporting this array to a CSV, and need to have a blank line between items. The CSV helper doesn't do this, so how do I add in an empty object between each item in my csv array?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source