> ## Documentation Index
> Fetch the complete documentation index at: https://learn.workflow.dog/llms.txt
> Use this file to discover all available pages before exploring further.

# Merge Objects

> Combine objects in order with optional deep merging.

The **Merge Objects** action combines a repeatable list of objects. When the
same property appears more than once, the value from the later object takes
precedence.

## Inputs

| Input          | Type            | Required | Description                                                          |
| -------------- | --------------- | -------- | -------------------------------------------------------------------- |
| **Objects**    | List of objects | No       | The objects to combine, in precedence order.                         |
| **Deep Merge** | Boolean         | No       | Merges nested values instead of replacing them. Defaults to `false`. |

## Outputs

| Output            | Type   | Description          |
| ----------------- | ------ | -------------------- |
| **Merged Object** | Object | The combined object. |

## Shallow and deep merging

<Tabs>
  <Tab title="Shallow merge">
    Nested objects are treated as complete values. Merging:

    ```json theme={null}
    { "customer": { "name": "Ada", "plan": "pro" } }
    { "customer": { "active": true } }
    ```

    returns:

    ```json theme={null}
    { "customer": { "active": true } }
    ```
  </Tab>

  <Tab title="Deep merge">
    Turn on **Deep Merge** to combine nested properties:

    ```json theme={null}
    {
      "customer": {
        "name": "Ada",
        "plan": "pro",
        "active": true
      }
    }
    ```
  </Tab>
</Tabs>

<Warning>
  Deep merging arrays combines them by index rather than simply appending or
  replacing the complete list. If array behavior matters, shape those values
  before merging.
</Warning>
