Contact Free trial Login

asExpressionString

asExpressionString(Path): String

Transforms a path to a string representation.

Parameters

Name Description

path

The path to transform to a string.

Example

This example transforms a path to a string representation.

Source

%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

".user.@name"

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub