> ## 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 or object: Contains

> Checks if a value exists within an array or object.

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

Checks whether a list (or the values of an object) contains a specific value. Use this when a field holds several values at once, such as the tags on a product or the channels an order belongs to, and you want to react only when one particular value is present. The check is exact: `sale` matches the entry `sale`, but not `on-sale` or `Sale`, and the text `"2"` is treated as different from the number `2`.

This documentation describes: [Schema](/schemas/condition/list-contains)

## Fields

<FormField property="value" label="Value" required>
  The value to look for inside the list. The condition passes when the list contains this exact value, and fails when it does not. Enter the value just as it appears in your data, including capitalisation.
</FormField>

## Sample data

The condition was pointed at the `tags` list of each product and set to look for the value `sale`.

| Field | Value  |
| ----- | ------ |
| Value | `sale` |

| Tags on the product              | Matches? |
| -------------------------------- | -------- |
| `["sale", "summer", "featured"]` | Yes      |
| `["winter", "clearance"]`        | No       |

```json Configuration theme={null}
{
  "prototype": "list-contains",
  "parameters": {
    "value": "sale"
  }
}
```
