Compare two list of strings to ensure it contains same elements and order of elements is same in both the lists

Hello, I need a help from this forum. I have created two list of strings named fruits = [“Apple”,“Banana”,“Orange”] and fruits2 = [“Apple”,“Orange”,“Banana”]. I have to compare these two list to ensure it contain same no of element and order of elements is same in both the list. Can anyone let me know which activity do I need to use for this process or any other optimum approach.

Thanks in advance!
Manoj Kumar V

@Palaniyappan, could you help on the above topic?

try
if activity and in condition Fruits1.SequenceEqual(Fruits2) = true

Regards

Hi @ManojKumarV, welcome to the Community.

Please find the attached workflow which might help you with this use case.

Input:

image

image

Output:

image

Workflow:

Test1Sequence.zip (2.0 KB)

Best Regards.

Thanks for your efforts Arjun

Thanks Lakshmi it worked for me

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.