> ## 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 an accessor

> The Accessor-move Transformer is used to take a part from the entity data and move it somewhere else in the structure.

Takes a part of the entity data and moves it somewhere else in the structure. It works just like [Copy using an accessor](/references/transformer/accessor-copy), except the original data is removed once it has been placed in its new location. Because you choose a way of reading values for the source and a way of writing them for the destination, you can move several matching values at once, such as lifting every line item's SKU out into a separate list. Use this to reshape an entity rather than duplicate data.

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

## Fields

**Source**

Required

The way of reading the values you want to move. Every value this reads is moved to the destination and then removed from its original spot. For example, a pattern accessor matching `order.items.*.sku` reads the SKU of every item in an order.

See the [accessor](/references/accessor) reference.

**Destination**

Required

The way of writing the moved values into the entity. For example, a key accessor with a root of `skus` places the values under a new `skus` location.

See the [accessor](/references/accessor) reference.

**Strip enclosures from keys**

Optional

Controls how a source path that contains dots is treated at the destination. When on (the default), a path such as `order.items.0.sku` is read as a nested path, so the moved value keeps that nested structure under the destination. When off, the whole path is kept as a single literal key. Leave it on unless you specifically want the dotted path preserved as one key.

## Sample data

| Field | Value |
| - | - |
| Source | Pattern accessor matching `order.items.*.sku` |
| Destination | Key accessor with root `skus` |
| Strip enclosures from keys | On (default) |

Input:

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

Output:

```json theme={null}
{
    "order": {
        "items": [
            { "qty": 2 },
            { "qty": 5 }
        ]
    },
    "skus": {
        "order": {
            "items": [
                { "sku": "A1" },
                { "sku": "B2" }
            ]
        }
    }
}
```

Every matched SKU has been moved out of the line items and into the new `skus` location, so `order.items` now only carries the quantities.

```json Configuration theme={null}
{
  "prototype": "accessor-move",
  "parameters": {
    "source": { "prototype": "pattern", "parameters": { "pattern": "order.items.*.sku" } },
    "destination": { "prototype": "key", "parameters": { "root": "skus" } }
  }
}
```


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