Hey @ThePepijnH!
You may be able to do this by setting your headers to be the values in your first row. Something like _,mapKeys
and .shift
should do the trick:
_.mapKeys(line_tems_for_DHL.data, value => value.shift())
(this also sneakily removes the first row from the dataset). Does the following give you what you're looking for?
utils.exportData(formatDataAsArray(_.mapKeys(line_tems_for_DHL.data, value => value.shift())), 'data', 'csv')