Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Group an Array to restructure data

(1) ShareShare
ReportReport
Posted on by 2
Hi,
I have the output below from a 'Filter Array' action. I want to restructure it so that It can be used to update a Sharepoint List.
 
Any help with this would be massively appreciated!
 
It's currently structured like this:
fieldTitle fieldReferenceId fieldValue sectionTitle sectionReferenceId repeatedSectionIndex
TM Item 7d6f6fa9-676d-43b2-8f01-0961c0a61813 Lane closure TM Items fa40b461-d5d9-498d-a76d-55217dd4fac4 1
Road speed 0d593880-f3ee-48fa-8d22-9501ccdd2004 40mph TM Items fa40b461-d5d9-498d-a76d-55217dd4fac4 1
Manual control 134662bf-7023-4186-ac4e-43be626c442d Yes TM Items fa40b461-d5d9-498d-a76d-55217dd4fac4 1
Manual control 134662bf-7023-4186-ac4e-43be626c442d No TM Items fa40b461-d5d9-498d-a76d-55217dd4fac4 0
Road speed 0d593880-f3ee-48fa-8d22-9501ccdd2004 30mph TM Items fa40b461-d5d9-498d-a76d-55217dd4fac4 0
TM Item 7d6f6fa9-676d-43b2-8f01-0961c0a61813 2-way lights TM Items fa40b461-d5d9-498d-a76d-55217dd4fac4 0
Add Another TM Item? f88769ba-2e7e-41b5-b6e3-26a14d6aaa40 Yes TM Items fa40b461-d5d9-498d-a76d-55217dd4fac4 0
Add Another TM Item? f88769ba-2e7e-41b5-b6e3-26a14d6aaa40 No TM Items fa40b461-d5d9-498d-a76d-55217dd4fac4 1
 
 
And i want it restructured like this:
repeatedSectionIndex TM Item Road speed Manual control
0 2-way lights 30mph No
1 Lane closure 40mph Yes
 
 
Below is the raw output from the Filter Array action:
{
    "body": [
        {
            "fieldTitle": "TM Item",
            "fieldReferenceId": "7d6f6fa9-676d-43b2-8f01-0961c0a61813",
            "fieldValue": "2-way lights",
            "sectionTitle": "TM Items",
            "sectionReferenceId": "fa40b461-d5d9-498d-a76d-55217dd4fac4",
            "repeatedSectionIndex": 0
        },
        {
            "fieldTitle": "Road speed",
            "fieldReferenceId": "0d593880-f3ee-48fa-8d22-9501ccdd2004",
            "fieldValue": "30mph",
            "sectionTitle": "TM Items",
            "sectionReferenceId": "fa40b461-d5d9-498d-a76d-55217dd4fac4",
            "repeatedSectionIndex": 0
        },
        {
            "fieldTitle": "Manual control",
            "fieldReferenceId": "134662bf-7023-4186-ac4e-43be626c442d",
            "fieldValue": "No",
            "sectionTitle": "TM Items",
            "sectionReferenceId": "fa40b461-d5d9-498d-a76d-55217dd4fac4",
            "repeatedSectionIndex": 0
        },
        {
            "fieldTitle": "Add Another TM Item?",
            "fieldReferenceId": "f88769ba-2e7e-41b5-b6e3-26a14d6aaa40",
            "fieldValue": "Yes",
            "sectionTitle": "TM Items",
            "sectionReferenceId": "fa40b461-d5d9-498d-a76d-55217dd4fac4",
            "repeatedSectionIndex": 0
        },
        {
            "fieldTitle": "TM Item",
            "fieldReferenceId": "7d6f6fa9-676d-43b2-8f01-0961c0a61813",
            "fieldValue": "Lane closure",
            "sectionTitle": "TM Items",
            "sectionReferenceId": "fa40b461-d5d9-498d-a76d-55217dd4fac4",
            "repeatedSectionIndex": 1
        },
        {
            "fieldTitle": "Road speed",
            "fieldReferenceId": "0d593880-f3ee-48fa-8d22-9501ccdd2004",
            "fieldValue": "40mph",
            "sectionTitle": "TM Items",
            "sectionReferenceId": "fa40b461-d5d9-498d-a76d-55217dd4fac4",
            "repeatedSectionIndex": 1
        },
        {
            "fieldTitle": "Manual control",
            "fieldReferenceId": "134662bf-7023-4186-ac4e-43be626c442d",
            "fieldValue": "Yes",
            "sectionTitle": "TM Items",
            "sectionReferenceId": "fa40b461-d5d9-498d-a76d-55217dd4fac4",
            "repeatedSectionIndex": 1
        },
        {
            "fieldTitle": "Add Another TM Item?",
            "fieldReferenceId": "f88769ba-2e7e-41b5-b6e3-26a14d6aaa40",
            "fieldValue": "No",
            "sectionTitle": "TM Items",
            "sectionReferenceId": "fa40b461-d5d9-498d-a76d-55217dd4fac4",
            "repeatedSectionIndex": 1
        }
    ]
}
 
  • Suggested answer
    Michael E. Gernaey Profile Picture
    43,305 Super User 2025 Season 1 on at
    Group an Array to restructure data
    Hi
     
    You need to use a Select Action against your Filter Array
     
    This way you can easily rename the columns and only choose what you want
    So below I put in a dummy From, you need to out the output of your Filter Array
     
    In the Enter Key side, put the column name you want
    In the value side put the expression item()?['FilterArrayColumnName'] make sure to update the column name in the ' ' quotes to whatever your filter array column is called.
     
    This will give you exactly what you want.
     

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492