--

There is no need of splitBy and join in your dataweave. You can directly use isNumeric filter on strings.

%dw 2.0

output application/json

import * from dw::core::Strings

var givenInput = [ "a1007" , "b2007", "c3007","d4007"]

var expectedOutput1= ["a" , "b","c" ,"d"]

---

givenInput map ((item, index) -> item filter !isNumeric($))

--

--

Shyam Raj Prasad
Shyam Raj Prasad

Written by Shyam Raj Prasad

Engineering Leader at Tricon Infotech Private Limited | Mulesoft Certified Developer and Architect

No responses yet