> For the complete documentation index, see [llms.txt](https://docs.rootcause.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rootcause.ai/more-details/applications/application-modules/merge.md).

# Merge

> Merge two JSON objects, b over a.

Merges two JSON objects with `b` winning on conflict. `deep` merges nested objects key by key; otherwise a key present in `b` replaces `a`'s value whole.

## At a glance

|                          |                              |
| ------------------------ | ---------------------------- |
| Module type              | `Merge`                      |
| Category                 | Primitives · Scalar and json |
| Default tier             | `reactive`                   |
| Runs on                  | `reactive`, `durable`        |
| Starts a flow            | no                           |
| Holds a body             | no                           |
| Keeps state between runs | no                           |
| Available in             | every application type       |

## Parameters

### `deep`

`boolean` · required · defaults to `true`

Merge nested objects key by key. Off, a key in `b` replaces `a`'s value whole.

## Inputs

| Port | Kind    | Required | Description                                                                                                                           |
| ---- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `on` | `event` | no       | Implicit on every module that does not itself start a flow: wire an event here to make this module the start of what that event runs. |
| `a`  | `json`  | yes      | The base object.                                                                                                                      |
| `b`  | `json`  | yes      | The object merged over it.                                                                                                            |

## Outputs

| Port   | Kind   | Connects to                | Description        |
| ------ | ------ | -------------------------- | ------------------ |
| `json` | `json` | `json`, `scalar`, `signal` | The merged object. |

***

[← All application modules](/more-details/applications/application-modules.md)
