Contact Us 1-800-596-4880

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"