> ## 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.

# Move using a path

> Takes a part of the entity data and moves it to a new location in the entity data. This transformer can be used to move the value of a key, or a nested key, like “product”, or “product.name” into a new key like “itemName”, or “item.itemName”.

export const FormField = ({property, label, required = false, diType, uiPatterns, children}) => {
  const patterns = Array.isArray(uiPatterns) ? uiPatterns : uiPatterns ? [uiPatterns] : [];
  return <div style={{
    margin: '1.5rem 0'
  }}>
      <div style={{
    display: 'flex',
    alignItems: 'baseline',
    flexWrap: 'wrap',
    gap: '0.5rem',
    marginBottom: '0.25rem'
  }}>
        <strong>{label}</strong>
        <span style={{
    fontSize: '0.7rem',
    fontWeight: 600,
    textTransform: 'uppercase',
    letterSpacing: '0.04em',
    color: required ? '#6241f5' : '#6b7280'
  }}>
          {required ? 'Required' : 'Optional'}
        </span>
      </div>

      <div>{children}</div>

      {diType || patterns.length > 0 ? <p style={{
    fontSize: '0.85rem',
    color: '#6b7280',
    marginBottom: 0
  }}>
          {diType ? <>
              See the <a href={`/references/${diType}`}>{diType}</a> reference.{' '}
            </> : null}
          {patterns.length > 0 ? <>
              Accepts a <a href={`/documentation/placeholders-and-patterns/patterns#${patterns[0]}`}>pattern</a>.
            </> : null}
        </p> : null}
    </div>;
};

Relocates a value within your data: it places the value at a new path and then removes it from the old one. This is the tool for renaming a field or reshaping where data sits, for example moving `product.name` into `item.itemName`. It works the same way as [Copy using a path](/references/transformer/pattern-copy), except the original is taken away once the move is done.

This documentation describes: [Schema](/schemas/transformer/pattern-move)

## Fields

<FormField property="pattern" label="Source" required uiPatterns="select-source">
  The path to the data you want to move. Use dot notation to reach into nested data, such as `product.name`. Use `*` to match every item in a list, such as `products.*.name`. Each `*` becomes a numbered group you can reuse in the destination: the first `*` is `$1`, the second is `$2`, and so on.
</FormField>

<FormField property="replacement" label="Destination" required uiPatterns="select-destination">
  The path where the value should end up. Refer back to the groups from the source with `$1`, `$2`, and so on. For a source of `products.*.name`, a destination of `product_names.$1` moves each product name into a `product_names` list, keeping its original position.
</FormField>

<FormField property="conditions[]" label="Conditions" diType="condition">
  One or more checks that decide whether a matched value is actually moved. A value is only moved when every condition you add is met, so you can move selectively instead of across the board. Leave this empty to always move.
</FormField>

## Sample data

| Field       | Value           |
| ----------- | --------------- |
| Source      | `product.name`  |
| Destination | `item.itemName` |

Input:

```json theme={null}
{
    "product": {
        "name": "Coffee mug",
        "sku": "MUG-01"
    }
}
```

Output:

```json theme={null}
{
    "product": {
        "sku": "MUG-01"
    },
    "item": {
        "itemName": "Coffee mug"
    }
}
```

The name has been moved out of `product` and into `item.itemName`, and the original `product.name` no longer exists.

```json Configuration theme={null}
{
  "prototype": "pattern-move",
  "parameters": {
    "pattern": "product.name",
    "replacement": "item.itemName"
  }
}
```
