Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Creating single record from array of records

(0) ShareShare
ReportReport
Posted on by 75

Hi Community!

 

I currently have an array the following format:

 

 

[
 {
 "sss_index": 1,
 "sss_name": "Project Overview",
 "sss_parentname": null,
 "sss_quotetemplateheadingid": "1b3cdc49-3e36-ee11-bdf5-00224891c295",
 "sss_tier": 1
 },
 {
 "sss_index": 1,
 "sss_name": "Project Summary",
 "sss_parentname": "Project Overview",
 "sss_quotetemplateheadingid": "6c0d2c51-3e36-ee11-bdf5-00224891c295",
 "sss_tier": 2
 },
 {
 "sss_index": 2,
 "sss_name": "Scope",
 "sss_parentname": null,
 "sss_quotetemplateheadingid": "b8d85c63-3e36-ee11-bdf5-00224891c295",
 "sss_tier": 1
 }

 

 

I'm looking to convert this into a single record, that looks like so:

 

 

{
 [sss_index]-[sss_name]:true
}

 or

{
 "1-Project Overview": true,
 "1-Project Summary": true,
 "2-Scope": true
}

 

 

Using Select, I am able to create an array of records like this:

 

 

[
 {
 "1-Project Overview": true
 },
 {
 "1-Project Summary": true
 },
 {
 "2-Scope": true
 }
]

 

 

But...I can't figure out how to create a single record out of the array.

 

Any ideas?

 

 

Thanks!

Brendan

  • Chriddle Profile Picture
    7,791 Super User 2025 Season 1 on at
    Re: Creating single record from array of records

    Something simple like this?

    Chriddle_0-1691998055157.png

     

    Comnpose code:

    {
     "inputs": {
     "@{outputs('Data')[0]['sss_index']}-@{outputs('Data')[0]['sss_name']}": true,
     "@{outputs('Data')[1]['sss_index']}-@{outputs('Data')[1]['sss_name']}": true,
     "@{outputs('Data')[2]['sss_index']}-@{outputs('Data')[2]['sss_name']}": true
     }
    }

     

    Outpu:

    {
     "1-Project Overview": true,
     "1-Project Summary": true,
     "2-Scope": true
    }

     

  • erofee Profile Picture
    75 on at
    Re: Creating single record from array of records

    @SanmeshG , the values I want in the record are a concatenation of strings from the previous records.  As I've demonstrated above.

  • SanmeshG Profile Picture
    1,947 Super User 2025 Season 1 on at
    Re: Creating single record from array of records

    Hi @Brendan1 ,

     

    If you original array has say 3 objects , then which value do you want to get/add for the new columns?

     

     

  • erofee Profile Picture
    75 on at
    Re: Creating single record from array of records

    Hi @SanmeshG ,

     

    I'd like to format the single record like so:

     

    {
     [sss_index]-[sss_name]:true
    }

     

    As an example of the end result i'd like:

     

    {
     "1-Project Overview": true,
     "1-Project Summary": true,
     "2-Scope": true
    }

     

     

    Any ideas?

  • SanmeshG Profile Picture
    1,947 Super User 2025 Season 1 on at
    Re: Creating single record from array of records

    Hi @Brendan1  ,

     

    Your current array has 3 objects and each object has the same columns with different values. 

     

    If you want to convert it to a single record which values you want to add for the columns(or properties in your new object)?

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