I have a flow and inside the flow and array, could somebody help me how to get from array duplicates records but in a specific way. let say I have an array
Name: Employee Names
Type: Array
Value: ["Alex","Alex","Mark", "Alex"]
is there any way to get only ["Alex", "Alex"] - only the first 2 duplicate records and terminate as soon as different value is detected i.e Mark
another examples:
Name: Employee Names
Type: Array
Value: ["Alex","Mark","Alex"]
Output -> null
Name: Employee Names
Type: Array
Value: ["Alex","Alex","Alex"]
Output -> ["Alex", "Alex", "Alex"]
Name: Employee Names
Type: Array
Value: ["Alex","Alex","Alex","Mark"]
Output -> ["Alex", "Alex", "Alex"]