hi,
I have two arrays,{"","1"} and {"2","3"}
I want to merge them, but exclude null and have something like this
{"1","2","3}.
Any help is appreciated
Discussion posts and replies are publicly visible
For an implementation that avoids the old and clunky primitive looping functions like filter(), we can use a!forEach() in this (and almost all other) use cases:
a!localVariables( local!array1: {"", "1"}, local!array2: {"2", "3"}, a!flatten( a!forEach( union(local!array1, local!array2), if( a!isNotNullOrEmpty(fv!item), fv!item, {} ) ) ) )
I will try this
tried this, it worked, thank you