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

# Apply operator to value

> Maps a value based on the supplied operator.

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

Maps a value based on the supplied operator. When the incoming value is a list, this combines the items into a single result using the operator you choose, such as adding numbers together, multiplying them, finding the largest, or joining text. The items in the list become the inputs to the operator, in order. If the incoming value is not a list, it is passed through unchanged.

This documentation describes: [Schema](/schemas/mapper/operator)

## Fields

<FormField property="operator" label="Operator" required diType="operator">
  The operation applied to the items in your list, for example adding, subtracting, multiplying, finding the largest, or joining text together. Pick the one that matches what you want to do with the list.
</FormField>

## Sample data

| Field    | Value     |
| -------- | --------- |
| Operator | Math: Add |

The list of quantities is added together into a single total:

Input:

```json theme={null}
{ "quantities": [3, 5, 2] }
```

Output:

```json theme={null}
{ "quantities": 10 }
```

```json Configuration theme={null}
{
  "prototype": "operator",
  "parameters": {
    "operator": "addition"
  }
}
```
