const res = [...new Set(arr.map(({date}) => { const match = date.match(/^\d\d\d\d-(\d\d)-(\d\d)$/); if (match) { const [, mm, dd] = match; date = `${dd}/${mm}`; } return `<div>${date}</div>`; }))];