web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Compare two string arr...
Power Automate
Answered

Compare two string arrays if equal

(0) ShareShare
ReportReport
Posted on by 11

Hi guys,

i got stuck comparing to arrays containing strings. Both arrays could contain the same strings, but just in a different order. How can I compare if they are the same?

 

BR Timo

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @timtatam 

     

    Please have a look at my video about how to compare two arrays.

     

    Power Automate - How To Compare Two Arrays - YouTube

     

    Thanks

  • Verified answer
    timtatam Profile Picture
    11 on at

    Thanks for the hint. In the end I came up with the following solution for my use case:

    timtatam_0-1605537630230.pngtimtatam_1-1605537655368.png

    split(replace(replace(replace(outputs('Get_response_details')?['body/r284952c369c047bd946bc46166c2282a'],'"',''),'[',''),']',''),',')
     
    intersection(variables('A1Q1-CorrectAnswer'),variables('A1Q1-GivenAnswer'))
     
    Condition:
    length(variables('A1Q1-GivenAnswer'))
    length(variables('A1Q1-CorrectAnswer'))
     
    Thanks a lot
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 791

#2
Valantis Profile Picture

Valantis 582

#3
Haque Profile Picture

Haque 529

Last 30 days Overall leaderboard