Recursively merge values in a JavaScript object.