Reputation: 1
Sample Request:
{
"message": "HELLO world!"
}
DataWeave script:
%dw 2.0
output application/json
import * from dw::core::Strings
---
camelize(payload.message)
Output Received:
"hELLO world!"
Expected Output:
"hello world!"
Upvotes: 0
Views: 645
Reputation: 932
as per your requirement you need all letters of a given string in lowercase, for that use "lower()" funciton that returns the provided string in lowercase characters as in below code
%dw 2.0
output application/json
---
lower(payload.message)
the output will be as you are expecting.
This is the screen shot for input, dw script and ouput
below are the official Mulesoft documents link
Camelize: https://docs.mulesoft.com/dataweave/2.2/dw-strings-functions-camelize
Lower : https://docs.mulesoft.com/dataweave/2.4/dw-core-functions-lower
Upvotes: 3