I have an array of strings i need the string which is duplicate . can u give me any simple functions to achieve this.
My array would be like this {"one","two","one","three"}
Thanks
Discussion posts and replies are publicly visible
Hi bhargavip,
Assuming if the array is {"one","two","one","three"} and if you are looking for the duplicate values in this array which is {"one"}.
You can use the below code for this
reject( fn!isnull, a!forEach( items: union({"one","two","one","three"},{"one","two","one","three"}), expression: if( count( wherecontains( fv!item, {"one","two","one","three"})) > 1, fv!item, null ) ) )