How to remove duplication from the list of values

  let currencyStringArray = customerData.currency.map(item => item.currency).join(',');
  log.debug("currencyStringArray",currencyStringArray)
  currencyStringArray = [...new Set(customerData.currency.map(item => item.currency))].join(',');

Leave a comment

Your email address will not be published. Required fields are marked *