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

# Expand path

> Combines the existing data and value moving all paths from source to destination pattern.

Finds every path that matches a source pattern and writes a value at a matching destination path for each one. The original data stays in place; this feature adds the new destination entries alongside it. Use it to build a new structure out of a repeating one, for example creating an entry under a new key for every item in a list. Each `*` in the source becomes a numbered capture, so the destination and value can place each result in its own spot.

This documentation describes: [Schema](/schemas/transformer/expand-path)

## Fields

**Source**

Required

The pattern that finds the paths to work from. Use `*` to match every item in a list, for example `items.*`. Each `*` becomes a numbered capture (`$1`, `$2`, and so on) that you can reuse in the Destination and Value fields.

**Destination**

Required

The path where each result is written. Reference the captures from the source with `$1`, `$2`, and so on, so each match lands at its own destination, for example `lines.$1.status`.

**Value**

Required

The value written at each destination. This can be a fixed text such as `pending`, or it can reference the source captures with `$1`, `$2`, and so on to write the matched index back into the data.

## Sample data

| Field | Value |
| - | - |
| Source | `items.*` |
| Destination | `lines.$1.status` |
| Value | `pending` |

For each item, `$1` holds the item's position, so the feature writes a `status` of `pending` under a matching entry in `lines`.

Input:

```json theme={null}
{
    "items": [
        { "sku": "A1" },
        { "sku": "B2" }
    ]
}
```

Output:

```json theme={null}
{
    "items": [
        { "sku": "A1" },
        { "sku": "B2" }
    ],
    "lines": [
        { "status": "pending" },
        { "status": "pending" }
    ]
}
```

```json Configuration theme={null}
{
  "prototype": "expand-path",
  "parameters": {
    "source": "items.*",
    "destination": "lines.$1.status",
    "value": "pending"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.