In this post Get all unique values in a JavaScript array (remove duplicates) one of the answers shows how to get unique items for an object array based on a value of a field (shown below), but it is in ES6 notation and I need help converting it to ES5 (no arrows or elipses).
let objArr = [{
id: '123'
}, {
id: '123'
}, {
id: '456'
}];
objArr = objArr.reduce((acc, cur) => [
...acc.filter((obj) => obj.id !== cur.id), cur
], []);
console.log(objArr);