Example 1 — Official fred
Right age and nested email win. name exists only on the left and is kept.
R.mergeDeepRight(
{ name: 'fred', age: 10, contact: { email: '[email protected]' } },
{ age: 40, contact: { email: '[email protected]' } }
);
//=> { name: 'fred', age: 40, contact: { email: '[email protected]' } } How It Works
age is two numbers, so right 40 is kept. contact is two objects, so it recurses, then right email is kept. That is the docs example from ramdajs.com.
