Community JavaScript Snippet
Dedupe by Key With Last-Write-Wins (JS)
dedupeBy(rows, 'id') is the function I copy into every ETL script. Last-write-wins is the right policy 90% of the time; this version also exposes a configurable resolver for the other 10%.
