Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Convert Object to Array

(0) ShareShare
ReportReport
Posted on by 19

Hey, I have this array of objects:

 

[
 {
 "Name" : "Bob"
 },
 "Email" : "Bob@hotmail.com"
 },
 {
 "DOB" : "19901025"
 }
]

 

 

And I would like to convert it into one object:

 

 

[
 {
 "Name" : "Bob",
 "Email" : "Bob@hotmail.com",
 "DOB" : "19901025"
 }
]

 

 

It would be a bonus if I can move this object out of the array since it will be the only entry, but any help is welcome. Thanks!

  • Verified answer
    tom_riha Profile Picture
    10,127 Most Valuable Professional on at
    Re: Convert Object to Array

    Hello @memorablename ,

    I'd probably brute-force this. Convert the initial array with the object into string:

    string(<yourInput>)

    replace },{ with only a comma:

    replace(string(<yourInput>),'},{',',')

    turn it back into an array with an object:

    json(replace(string(<yourInput>),'},{',','))

    get rid of the array and keep only the object (first value in the array)

    first(json(replace(string(<yourInput>),'},{',',')))

     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June 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 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1