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

# Object: Diff keys

> Returns the keys present in the object but not in the supplied data.

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 keep only the entries whose keys are not present in a reference set you supply. It compares by key rather than by value: any key that also exists in the supplied data is removed, taking its value with it. This is useful for stripping out fields you do not want, for example removing internal attributes from a product before sending it onward.

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

## Fields

<FormField property="array" label="Data" required>
  The reference keys to remove, entered directly as a small block of data in the form. Only the keys matter here, not their values; any entry in the input whose key appears here is dropped from the result.
</FormField>

## Sample data

This example removes the `brand` and `material` attributes from a product, keeping the rest.

| Field | Value                                 |
| ----- | ------------------------------------- |
| Data  | `{ "brand": null, "material": null }` |

Input:

```json theme={null}
{
    "color": "red",
    "size": "M",
    "material": "wool",
    "brand": "Acme"
}
```

Output:

```json theme={null}
{
    "color": "red",
    "size": "M"
}
```

The `material` and `brand` entries are removed because their keys appear in the supplied data, while `color` and `size` are kept. The values you give the supplied keys are ignored, so `null` is a convenient placeholder.

```json Configuration theme={null}
{
  "prototype": "list-diff-keys",
  "parameters": {
    "array": { "brand": null, "material": null }
  }
}
```
