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

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