Prism · Structure

$merge

Merges objects one level deep, left to right. A key in a later object replaces the same key in an earlier one.

The source
{
  defaults: { theme: 'light', fontSize: 14, autoSave: true },
  overrides: { theme: 'dark', fontSize: 16 },
}
The config
{
  $merge: [{ $ref: '$.defaults' }, { $ref: '$.overrides' }],
}
What comes out
{ theme: 'dark', fontSize: 16, autoSave: true }
Output matches the expected value

Runs in this page on the installed package. The input and the expected output are defined by the example.