[
{ name: "Dill", surname: "Jones", age: 25 },
{ name: "Dill", surname: "Clint", age: 25 },
{ name: "Dill", surname: "Gomes", age: 25 },
]
{ name: "Dill", surname: null, age: 25 }
const obj = Object.fromEntries(Object
.entries(arr
.flatMap(Object.entries)
.reduce((acc, n) => ((acc[n[0]] ??= new Set).add(n[1]), acc), {}))
.map(([ k, v ]) => [ k, v.size === 1 ? [...v][0] : null ])
);
const obj = arr.reduce((acc, n) => (
Object.keys(n).forEach(k => {
acc[k] = Object.hasOwn(acc, k) && n[k] !== acc[k] ? null : n[k];
}),
acc
), {});