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

# Array: Extract field

> Gets the values for a single key from each item in an array.

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

Use this mapper to pull one field out of every item in a list and collect those values into a single, flat result. For example, from a list of order lines you can grab just the product names, or from a list of customers just their email addresses. You can also choose which field to use as the key for each value, so the result becomes a lookup table instead of a plain numbered list.

This documentation describes: [Schema](/schemas/mapper/list-column)

## Fields

<FormField property="columnKey" label="Column key">
  The field to read from each item in the list. Every item contributes the value found under this field, and those values become the result. Leave it empty to keep each whole item instead of a single field.
</FormField>

<FormField property="indexKey" label="Index key">
  The field whose value becomes the key for each collected value, turning the result into a lookup. Leave it empty to get a plain, numbered list instead.
</FormField>

## Sample data

This example reads the product name from each order line and keys each name by its SKU.

| Field      | Value  |
| ---------- | ------ |
| Column key | `name` |
| Index key  | `sku`  |

Input:

```json theme={null}
[
    { "sku": "SCARF-01", "name": "Wool scarf", "qty": 2 },
    { "sku": "BELT-02", "name": "Leather belt", "qty": 1 }
]
```

Output:

```json theme={null}
{
    "SCARF-01": "Wool scarf",
    "BELT-02": "Leather belt"
}
```

Leaving the Index key empty would instead give a numbered list of names, `["Wool scarf", "Leather belt"]`.

```json Configuration theme={null}
{
  "prototype": "list-column",
  "parameters": {
    "columnKey": "name",
    "indexKey": "sku"
  }
}
```
