Input JSON.
[
"test11",
"test12",
"test13",
"test14",
"test15",
"test16",
"test17",
"test18",
"test19",
"test20",
"test21",
"test22",
"test23",
"test24",
"ref11",
"ref12",
"ref13",
"ref14",
"ref15",
"ref16",
"ref17",
"ref18",
"ref19",
"ref20",
"ref21",
"ref22",
"ref23",
"ref24"
]
Need to filter out (remove) those names that are matching with names with "test" and "bkp".
The dataweave expression that i tried was :
%dw 1.0
%output application/java
---
payload filter ($ contains "test")
The output of this transformation will only return a list containing "test" . However i need an array without this list.
Appreciate any help or pointers related to this.
Thanks!
Hello @raghavk
You can try this approach,
%dw 1.0
%output application/json
---
payload filter not ($ matches /^.(test|bkp).$/)
Ryan Anthony Andal
MuleSoft Forum Moderator
Senior Integration Consultant`Please report spam messages in the forum.`