Returns a range with the specified boundaries.
The upper boundary is inclusive.
Name | Description |
---|---|
|
|
|
|
This example lists a range of numbers from 1 to 10.
DataWeave treats a string as an array of characters. This example applies to
to a string.
%dw 2.0
var myVar = "Hello World!"
output application/json
---
{
indices2to6 : myVar[2 to 6],
indicesFromEnd : myVar[6 to -1],
reversal : myVar[11 to -0]
}