const dir = films.reduce( (acc, cur) => {
acc[cur.director] = [ ... (acc[cur.director] || [] ), cur.title ];
return acc;
}, {});