Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 6yeSzwuWCjNxPowdv01pcZ
Power Automate - Building Flows
Answered

Merge 2 separate Filter array action output into one array

Like (0) ShareShare
ReportReport
Posted on 18 Apr 2023 02:41:00 by 164

Is it possible to merge the output from the below filter actions into one array for additional filtering? I need to put the output of both into one array so I can remove duplicates returned in both actions.

 

RADical_0-1681785585763.png

 

Thanks!

  • RADical Profile Picture
    164 on 19 Apr 2023 at 02:16:57
    Re: Merge 2 separate Filter array action output into one array

    @grantjenkinsThanks for your help...I think it got me on the right path. Much appreciated!

     

  • RADical Profile Picture
    164 on 18 Apr 2023 at 12:23:50
    Re: Merge 2 separate Filter array action output into one array

    @grantjenkinsAs always, thanks for the swift response and great help.

     

    That worked to combine the items into one, but for some reason it didn't get rid of the duplicates.

     

    This was the output of the union:

     

     

     

    [
     {
     "Row_Ref": "4",
     "DNAT_RuleCollectionPriority": "\n600",
     "DNAT_RuleCollectionName": "\nnat",
     "DNAT_RuleName": "\nib-test-udp-75",
     "DNAT_Source": "\n*",
     "DNAT_Port": "\n75",
     "DNAT_Protocol": "\nUDP",
     "DNAT_Destination": "\nxx.xxx.xxx.59",
     "DNAT_TranslatedAddress": "\nxx.xxx.1.6",
     "DNAT_TranslatedPort": "\n75",
     "DNAT_Action": "\nDnat",
     "DNAT_DestinationFQDNs": "\n",
     "DNAT_DestinationIPGroups": "\n"
     },
     {
     "Row_Ref": "4",
     "DNAT_RuleCollectionPriority": "\n600",
     "DNAT_RuleCollectionName": "\nnat",
     "DNAT_RuleName": "\nib-test-udp-75",
     "DNAT_Source": "\n*",
     "DNAT_Port": "\n75",
     "DNAT_Protocol": "\nUDP",
     "DNAT_Destination": "\nxx.xxx.xxx.59",
     "DNAT_TranslatedAddress": "\nxx.xxx.1.6",
     "DNAT_TranslatedPort": "\n75",
     "DNAT_Action": "\nDnat",
     "DNAT_DestinationFQDNs": "\n",
     "DNAT_DestinationIPGroups": "\n"
     },
     {
     "Row_Ref": "15",
     "DNAT_RuleCollectionPriority": "\n100",
     "DNAT_RuleCollectionName": "\nnat",
     "DNAT_RuleName": "\nib-thisisatest-tcp-447",
     "DNAT_Source": "\n*",
     "DNAT_Port": "\n447",
     "DNAT_Protocol": "\nTCP",
     "DNAT_Destination": "\nxx.xxx.xxx.61",
     "DNAT_TranslatedAddress": "\nxx.xxx.x.9",
     "DNAT_TranslatedPort": "\n447",
     "DNAT_Action": "\nDnat",
     "DNAT_DestinationFQDNs": "\n",
     "DNAT_DestinationIPGroups": "\n"
     }
    ]

     

     

     Is there any way to get rid of the duplicate item in the return format? As you can see the output has two inner blocks with the exact same data.

  • Verified answer
    grantjenkins Profile Picture
    11,059 Super User 2025 Season 1 on 18 Apr 2023 at 03:12:44
    Re: Merge 2 separate Filter array action output into one array

    You can add the output from each of your Filter arrays into a union expression to combine them.

     

    union(body('Filter_DNAT_array_1'), body('Filter_DNAT_array_2'))

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
stampcoin Profile Picture

stampcoin 99

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 82 Super User 2025 Season 1

#3
David_MA Profile Picture

David_MA 48 Super User 2025 Season 1

Overall leaderboard