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 / How to rearrange Array...
Power Automate
Answered

How to rearrange Array content

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello dear community

I have the following array

 

[
{
"Tracking Dimension": "NPD"
},
{
"Item Model Group": "NPD"
},
{
"Item Model Group": "NPD"
},
{
"Storage Dimension Group": "NPD"
},
{
"Reservation Hieararchy": "NPD"
},
{
"Product Coverage": ""
},
{
"Batch Number Group": "",
"End Of The Month": "No"
},
{
"Flushing Principle": "Manual"
},
{
"Commodity": ""
},
{
"Customer Hierarchy": ""
},
{
"Attributes": "None"
},
{
"Conversion EA to CS": "Not existing"
}
]

 

 

I would like to rework the array below in the following way.

 

[
{
"Tracking Dimension": "NPD",
"Item Model Group": "NPD",
"Item Model Group": "NPD",
"Storage Dimension Group": "NPD",
"Reservation Hieararchy": "NPD",
"Product Coverage": "",
"Batch Number Group": "",
"End Of The Month": "No",
"Flushing Principle": "Manual",
"Commodity": "",
"Customer Hierarchy": ""
"Attributes": "None",
"Conversion EA to CS": "Not existing"
}
]

How do I achieve this in PA?

 

Categories:
I have the same question (0)
  • Verified answer
    Ellis Karim Profile Picture
    11,933 Super User 2026 Season 1 on at

    Hi @Anonymous ,

     

    You can try this method:

    Snag_9ebe570.png

     

    Convert the data array into a text string,  replace each occurence of the substring  },{  with , (comma), then convert the result back into a (JSON) array: 

    Snag_9efd3ba.png

    json(replace(string(variables('varData')), '},{',','))

    json(replace(string(variables('varData')), '},{',','))

     

    Here is the sample runtime output:

    Snag_9f557b6.png

    [
     {
     "Tracking Dimension": "NPD",
     "Item Model Group": "NPD",
     "Storage Dimension Group": "NPD",
     "Reservation Hieararchy": "NPD",
     "Product Coverage": "",
     "Batch Number Group": "",
     "End Of The Month": "No",
     "Flushing Principle": "Manual",
     "Commodity": "",
     "Customer Hierarchy": "",
     "Attributes": "None",
     "Conversion EA to CS": "Not existing"
     }
    ]

     

    Ellis
    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    It worked nicely.

    Thank you very much

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!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 250 Super User 2026 Season 1

#2
Expiscornovus Profile Picture

Expiscornovus 222 Most Valuable Professional

#3
Haque Profile Picture

Haque 174

Last 30 days Overall leaderboard