---
schema_version: "1"
id: eacfa4a26286d4f1db719253befc764aa912f47c463c0a578e482a6b2ff121fa
title: asExpressionString
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.12/dw-tree-functions-asexpressionstring.md
canonical_url: https://docs.mulesoft.com/dataweave/2.12/dw-tree-functions-asexpressionstring
source_site: docs.mulesoft.com
content_type: documentation
content_hash: c92d2078c51be9a82fd50be651fb995206afcad955b969070f644b0250bc9e8c
description: MuleSoft Documentation Site
release: "2.12"
latest: false
---
---
product: DataWeave
version: 2.12
---

# asExpressionString

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

## asExpressionString(path: Path): String

Transforms a `Path` value into a string representation of the path.

_Introduced in DataWeave version 2.2.2._

### Parameters

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><code>path</code></p></td><td><p>The <code>Path</code> value to transform into a <code>String</code> value.</p></td></tr></tbody></table>

### Example

This example transforms a `Path` value into a `String` representation of a selector for an attribute
of an object.

#### Source

```DataWeave
%dw 2.0
import * from dw::util::Tree
output application/json
---
asExpressionString([
        {kind: OBJECT_TYPE, selector: "user", namespace: null},
        {kind: ATTRIBUTE_TYPE, selector: "name", namespace: null}
    ])
```

#### Output

```Json
".user.@name"
```
