var arr = [{ key: 'AUDIT_RATING', value: 'AAA' }, { key: 'AUDIT_RATING_RES', value: 'BBB' }, { key: 'AUDIT_RATING', value: 'CCC' }, ]; function setUnique(arr) { var result = []; var obj = {}; for(var i =0; i<arr.length; i++){ obj[arr[i].key] = arr[i].value; } for (let key in obj) { result.push({ key:key, value:obj[key] }) } return result } console.log(setUnique(arr))