Which keyword do you use to create a new function in DataWeave?
Which keyword do you use to create a new function in DataWeave?
The correct keyword to create a new function in DataWeave is 'fun'. The syntax to define a function is 'fun myFunction(param1, param2, ...) = <code to execute>'. This is documented in the Mulesoft official documentation for DataWeave functions.
To define a function in DataWeave use the following syntax: fun myFunction(param1, param2, ...) = <code to execute> https://docs.mulesoft.com/dataweave/2.4/dataweave-functions