NEW TICKET#23 · Clients
Merge duplicate clients by email
Priya Raman · Product Manager
Opened today
“After the spreadsheet import, a lot of accounts have the same client two or three times: once from the import, once typed in by hand as "Ana@Studio.com " with a capital and a stray space. We'll add a "Merge duplicates" button. Two clients are the same when their email addresses match once you ignore capital letters and spaces at either end. Keep the name from the first one in the list, add up their invoice counts, store the address in lower case without the spaces, and keep the clients in the order they first appear. Can you write mergeClients?”
YOUR PLAN
- 1Watch an example2 min
- 2Warm-up 11 min
- 3Warm-up 21 min
- 4Fix the ticket16 min
BY THE END YOU CAN
- Use a Map to find what you've already seen
- Tidy a key before you use it
- Build new objects instead of changing the input