If I have a javascript object/assoc. array defined like this:
function somefunction(options) { var defaults = { prop1: \'foo\', prop2: \'bar
After re-reading the question, I realized you're probably looking for something more like this:
var a = { 'foo': 'bar', 'baz': 'bat' }; var b = { 'foo': 'quux' }; for (var prop in a) { if (prop in b) { continue; } b[prop] = a[prop]; }