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

# For each item

> Loop over items and apply a transformer to each.

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

Loops over every item matching the path you give and applies one or more transformers to each item on its own. Use this when your data contains a repeating list, such as the products in an order or the posts in a feed, and you want to run the same set of changes on each item individually instead of on the whole list at once. The transformers you choose run in order against each matched item, so paths and placeholders inside them are read relative to that item.

This documentation describes: [Schema](/schemas/transformer/node)

## Fields

<FormField property="pattern" label="Path" required uiPatterns="pattern">
  The path to the items to loop over. Use `*` to match every item in a list, for example `products.*`. Each matched item is passed, one at a time, through the transformers below.
</FormField>

<FormField property="nodeTransformers" label="Data transformers" diType="transformer">
  The transformers applied to each matched item. They run in order on every item, so you can chain several steps, for example setting a value and then mapping another. Each transformer works on a single item at a time, so a path like `name` refers to that item's own `name`.
</FormField>

## Sample data

This feature is a wrapper: it does not change data on its own, it runs the transformers you place inside it once per matched item. The example below loops over every post in `http.posts` and, for each post, adds a `userName` taken from a matching user.

```json Configuration theme={null}
{
  "prototype": "node",
  "parameters": {
    "pattern": "http.posts.*",
    "nodeTransformers": [
      {
        "prototype": "value-setter",
        "parameters": {
          "configurations": [
            { "key": "userName", "value": "&{users[?id==userId].username | [0]}" }
          ]
        }
      }
    ]
  }
}
```
