> For the complete documentation index, see [llms.txt](https://docs.fortifiedid.se/pipes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fortifiedid.se/pipes/valves/ldap/dn-parse.md).

# DN Parse

Valve for adding RDNs on current item, after parsing a DN string.

## Introduction

Use this valve to parse a DN string and add all RDNs as properties on the current item.

Optionally the values can be placed on the state object.

Which items to include in merge can be controlled with `"item_include_expr"`, see [Item](/pipes/valves/item.md).&#x20;

## Configuration

{% hint style="info" %}
**Valve name:** `DnParser`
{% endhint %}

{% tabs %}
{% tab title="Properties" %}

<table><thead><tr><th width="158">Name</th><th width="250">Description</th><th width="157">Default value</th><th width="131" data-type="checkbox">Mandatory</th><th width="123" data-type="checkbox">Expanded</th></tr></thead><tbody><tr><td><code>src</code></td><td>Source of the DN string.</td><td>N/A</td><td>true</td><td>true</td></tr><tr><td><code>prefix</code></td><td>A prefix can be added before the "type". </td><td>N/A</td><td>false</td><td>false</td></tr><tr><td><code>use_state</code></td><td>The values are stored on the state object.</td><td><code>false</code></td><td>false</td><td>false</td></tr><tr><td><code>dest_id</code></td><td>If no item is found (and NOT using state) a new item is created with this id.</td><td>N/A</td><td>false</td><td>true</td></tr></tbody></table>
{% endtab %}

{% tab title="Example" %}

```json
{
    "name": "DnParser",
    "config": {
        "src": "${item.id}",
        "prefix": "prefix_",
        "use_state": false, 
        "dest_id": "dest_id"
    }
}
```

{% endtab %}
{% endtabs %}
