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

# 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"
```
