I guess you mean duplicate values and not duplicate key/value pairs. This is how I'd do it:
function findDuplicateValues(input) {
var values = {},
key;
for (key in input) {
if (input.hasOwnProperty(key)) {
values[input[key]] = values.hasOwnProperty(input[key]) ? values[input[key]] + 1 : 1;
}
}
for (key in values) {
if (values.hasOwnProperty(key) && values[key] > 1) {
console.log('duplicate values found');
break;
}
}
}
For large objects it will be quicker than the previous answer, because there are no nested loops (this will execute in linear O(n) time rather than quadratic O(n2) time).