unique(arr, key) { const map = new Map(); return arr.filter(item => !map.has(item[key]) && map.set(item[key], true)); },