How to split a string into Array in MuleSoft using Split By function.
This function is part of core module. It helps splitting a string into a string array on the basis of a value that matches the original string.
Add the transform Message Component in the mule flow from component palette.
In this component we can write the Dataweave script to split a string into array as shown below. We can click on Preview button to see the resultant of Dataweave operation.
var x= “12.13.15”
x splitBy “.”
Here “.” is matched in the original string “12.13.15” and an array is returned. The resultant array will exclude the matching string from the original string.
Reference Link: https://docs.mulesoft.com/mule-runtime/4.3/