Free MuleSoft CONNECT Keynote & Expo Pass Available!

Register now+
Nav

startsWith

startsWith(String, String): Boolean

Returns true or false depending on whether a string starts with a provided substring.

Transform

        
     
1
2
3
4
5
6
7
%dw 2.0
output application/json
---
{
  a: "Mariano" startsWith "Mar",
  b: "Mariano" startsWith "Em"
}
Output

        
     
1
2
3
4
{
  "a": true,
  "b": false
}