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

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