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

# By pattern

> Accesses values whose paths match the supplied pattern.

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>;
};

Accesses values whose paths match the supplied pattern. Use this when you want to pull out one or more values by their location in the data, including across a whole list at once. A pattern uses dot notation to walk through nested data and supports `*` as a wildcard that matches every item in a list, so you can read the same field from every product or order line in a single step.

This documentation describes: [Schema](/schemas/accessor/pattern)

## Fields

<FormField property="pattern" label="Pattern" uiPatterns="pattern">
  The dot-notated path to the data you want to read. Use `*` to match every item in a list. Each value is read at the exact path it was found, so when the result is copied elsewhere it keeps the same nesting. See [Placeholders](/references/placeholders) for the full syntax.

  * Use `product.name` to read a single value.
  * Use `products.*.name` to read the name of every product in a list.
  * Use `products.0` to read the first item of a list.
</FormField>

<FormField property="keys" label="Keys">
  A list of keys that limits which matched values are kept. Leave it empty to return everything the pattern matches.
</FormField>

## Sample data

| Field   | Value             |
| ------- | ----------------- |
| Pattern | `products.*.name` |

The pattern matches the `name` of every product. Each matched value keeps its place in the data, so the result mirrors the original list and contains only the matched fields.

Input:

```json theme={null}
{
    "products": [
        { "name": "Wool scarf", "sku": "A1" },
        { "name": "Leather belt", "sku": "B2" }
    ]
}
```

Output:

```json theme={null}
{
    "products": [
        { "name": "Wool scarf" },
        { "name": "Leather belt" }
    ]
}
```

```json Configuration theme={null}
{
  "prototype": "pattern",
  "parameters": {
    "pattern": "products.*.name"
  }
}
```
