Делаем просто:
const result = tags.filter(n => active.some(m => m.name === n.name));
Делаем сложно:
function intersection(data1, data2, key = n => n) {
const result = [];
const getKey = key instanceof Function ? key : n => n[key];
const keys = new Set(Array.from(data2, getKey));
for (const n of data1) {
if (keys.has(getKey(n))) {
result.push(n);
}
}
return result;
}
// ваш случай
const result = intersection(tags, active, 'name');
// есть и другие варианты применения
intersection([ 69, 187, 666 ], [ 0, 1, 2, 3, 187 ]) // [187]
intersection(Array(10).keys(), Array(3).keys()) // [0, 1, 2]
intersection('aBCdE', 'bDfHj', n => n.toLowerCase()) // ['B', 'd']