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

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