Aidec,
function uniqueArr(a, b, key) {
[a, b] = [a, b].map(k => k.map(a => a[key]));
return a.filter(a => !b.includes(a)).concat(b.filter(b => !a.includes(b)))
}
const Mas1 = [{
name: "Anton",
age: "20"
}, {
name: "Artem",
age: "23"
}, {
name: "Rafik",
age: "32"
}];
const Mas2 = [{
name: "Anton",
age: "20"
}, {
name: "Andrey",
age: "40"
}, {
name: "Artem",
age: "23"
}, {
name: "Rafik",
age: "32"
}];
let unique = uniqueArr(Mas1, Mas2, 'name');
alert(JSON.stringify(unique));
unique = uniqueArr(Mas1, Mas2, 'age');
alert(JSON.stringify(unique));