
Questions: 23,758 //
Answers: 52,364 //
Contributing Members: 18,024
Mule 3: how to check if a substring value exists in arraylist in dataweave?
%dw 1.0
%output application/java
%var Str = "google.com"
%var arrayList = ["google","facebook","apple", "amazon"] // array list is fixed
----
{
result : "www.google.com" when Str contains arrayList otherwise Str
}
Expected outcome : result : www.google.com
Dec 05, 2018 at 01:21 AM, rohit9771 answered with:
@anuushar are you expecting like below
%dw 1.0
%output application/java
%var Str = "google.com"
%var arrayList = ["google","facebook","apple", "amazon"] // array list is fixed
---
{
result : "www.google.com" when (sizeOf (arrayList filter (Str contains $))) > 0 otherwise Str
}
Signed vs Unsigned numeric in dataweave 0 Answers
How to replace multiple keys in one string in dataweave 2.0 4 Answers
How to Sort Json array Elements based on a Element value in dataweave 1 Answer
Common dataweave mapping 1 Answer
Remove the top element from request json and malp rest all along-with top element. 2 Answers