Contact Free trial Login

locationString

locationString(Any): String

Returns the location string of a given value.

Parameters

Name Description

value

A value of any type.

Example

This example returns the contents of the line (the location) that defines variable a in the header of the DataWeave script.

Source

%dw 2.0
import * from dw::Runtime
output application/json
var a = 123
---
locationString(a)

Output

"var a = 123"