вариант решения без reduce
const arr = [{
'name': 'anna',
'lastname': 'petrova'
},
{
'name': 'vika',
'lastname': 'ivanova'
},
{
'name': 'julia',
'lastname': 'petrova'
},
];
const table = {};
const res = arr.filter(({lastname}) =>(!table[lastname] && (table[lastname] = 1)));
console.log(res)