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
var a = 123
output application/json
---
locationString(a)

Output

"var a = 123"

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.