This can be achieved using the Parse JSON, Select and Join actions.

The finished flow will be trigger by a button and contain the following actions:

  1. Initialize variable - Initialize a variable with the data we want to manipulate
  2. Parse JSON - Assigns a schema to the data allowing us to more easily access the array
  3. Select - Converts the object array into a string array
  4. Join - Concatenates all the items within the string array

and look like this:

Each action needs to be implemented as follows:

1. Initialize variable

First add an initialize variable action with the following values:
  • Name: data
  • Value: The JSON you want to process (as noted in the answer the "@" characters should be removed)

2. Parse JSON

You then need to add a Parse JSON action to tell power automate the schema of the data assigned in the initialize variable action. This will allow us to more easily reference the array in the next step. The values should be set to:
  • Content: The data variable
  • Schema:
{
    "type": "object",
    "properties": {
        "odata.context": {
            "type": "string"
        },
        "value": {
            "type": "array",
            "items": {
                "type": "object"
            }
        }
    }
}

3. Select

Now add a Select action. This action is normally used to transform one array of objects. However, we can use it to return an array of strings. To do this click the Switch Map to text mode button.

Although you can achieve the desired result by using the expression item()['displayName'], it's possible to construct more complex string by combining the values within the object. For example, we could combine the displayName and mail properties by setting the map value to "@{item()['displayName']} - @{item()['mail']}".

4. Join

Finally use a Join action to concatenate the string array produced by the Select action with a specific separator (in your case a comma and space character , ).

Answer from Castrohenge on Stack Overflow
🌐
Microsoft Learn
learn.microsoft.com › en-us › connectors › custom-connectors › policy-templates › convertarraytoobject › convertarraytoobject
Convert An Array To An Object(Preview) | Microsoft Learn
March 18, 2025 - Converts an array in the body to a JSON object with elements identified by a user specified key. This template is available in Power Apps and Power Automate.
Top answer
1 of 2
5

This can be achieved using the Parse JSON, Select and Join actions.

The finished flow will be trigger by a button and contain the following actions:

  1. Initialize variable - Initialize a variable with the data we want to manipulate
  2. Parse JSON - Assigns a schema to the data allowing us to more easily access the array
  3. Select - Converts the object array into a string array
  4. Join - Concatenates all the items within the string array

and look like this:

Each action needs to be implemented as follows:

1. Initialize variable

First add an initialize variable action with the following values:
  • Name: data
  • Value: The JSON you want to process (as noted in the answer the "@" characters should be removed)

2. Parse JSON

You then need to add a Parse JSON action to tell power automate the schema of the data assigned in the initialize variable action. This will allow us to more easily reference the array in the next step. The values should be set to:
  • Content: The data variable
  • Schema:
{
    "type": "object",
    "properties": {
        "odata.context": {
            "type": "string"
        },
        "value": {
            "type": "array",
            "items": {
                "type": "object"
            }
        }
    }
}

3. Select

Now add a Select action. This action is normally used to transform one array of objects. However, we can use it to return an array of strings. To do this click the Switch Map to text mode button.

Although you can achieve the desired result by using the expression item()['displayName'], it's possible to construct more complex string by combining the values within the object. For example, we could combine the displayName and mail properties by setting the map value to "@{item()['displayName']} - @{item()['mail']}".

4. Join

Finally use a Join action to concatenate the string array produced by the Select action with a specific separator (in your case a comma and space character , ).

2 of 2
0

I did the following ...

Loaded your JSON (minus the @ symbols because PA doesn't like them) into a variable so I can loop over it.

I then created two other variables, one to hold the concatenated string as it's being worked on and the other to hold the end result.

I then looped over the array of values and pulled out the displayName property and appended it (with a leading comma) to the Concatenated String variable.

Expression 1 = variables('Data')['value']

Expression 2 = item()['displayName']

The final step is to then remove the leading comma with an expression.

Expression = substring(variables('Concatenated String'), 1)

Result

Flow

Discussions

[Question] How to Create a single JSON object from an Array of Objects
You'll have to loop through the array using the 'Apply to each' action, and inside of it remove the { and } from each of the lines and append it into a single string variable separated by commas. And at the end of it, remove the last comma and add the brackets around this new string. In the flow, you'll need 2 string variables, let's call them 'tmp' and 'final' 'Apply to each' on the array 'Set variable': tmp = Current item 'Append to string variable': final = replace(replace(variables('tmp'),'}',''),'{', '') , (comma at the end) 'Set variable': tmp = final 'Set variable: final = { substring(variables('tmp'),0,add(length (variables('tmp')),-1)) } You need the two variables because you can't use the variable you're 'setting' in the expression in the Value field. More on reddit.com
🌐 r/MicrosoftFlow
3
6
October 22, 2020
powerapps - Convert JSON (Object) to Array - Power automate - Stack Overflow
In a power automate flow that I'm currently creating, I need to read the body of a specific email, previously I used the Get Emails V3 and that works great but the Get Emails widget only takes 25 e... More on stackoverflow.com
🌐 stackoverflow.com
Solved: Array into json - Power Platform Community
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 · Congratulations to our community stars More on community.powerplatform.com
🌐 community.powerplatform.com
August 7, 2024
PowerAutomate: Json Array to String back to array. JSON() returns only first entry
I think I know what you’re trying to do but I think you are approaching it the wrong way maybe or there is some syntax error perhaps. Take a look at this video which should explain it but you have to init var as an array using output of csv inside of a split function and then map those into a table and then use the outputs of that table into whatever you want I think https://youtu.be/lZDTTVnK8vw Maybe I am not understanding but I think this might help More on reddit.com
🌐 r/PowerPlatform
14
4
December 15, 2021
🌐
Reddit
reddit.com › r/microsoftflow › [question] how to create a single json object from an array of objects
r/MicrosoftFlow on Reddit: [Question] How to Create a single JSON object from an Array of Objects
October 22, 2020 -

[Solved - see answer below] Currently setting up a form that sends submission data in through an awkwardly formatted JSON array and I'm wanting to format it into something easy to parse for tying into a CRM. I've been able to use the "select" operation to pair the keys and values the way I want to, but am hitting a wall in terms of knowing how to convert the array that it gives me into a single JSON object containing multiple name/value pairs.

[
    {
      "Company Name": "ContosoLatoso LLC"
    },
    {
      "First Name": "John"
    },
    {
      "Last Name": "Smith"
    },
    {
      "Email Address": "test@contosolatoso.com"
    },
    {
      "Country": "USA"
    },
    {
      "Type of Company": "Organization using Microsoft 365"
    },
    {
      "How many users need this functionality?": "300"
    },
    {
      "Explain your need for this functionality": "We need it badly"
    },
    {
      "Top features & functionality you think should be included in the product": "We want it muchly"
    },
    {
      "Other Questions": "How much will it cost?"
    }
  ]

I would like to take the data from that array and format it into a single JSON object as demonstrated below...

{
   "Company Name": "ContosoLatoso LLC",
   "First Name": "John",
   "Last Name": "Smith",
   "Email Address": "test@contosolatoso.com"
//...And so on and so forth for all the objects from the array above...
}

Any input on how to go about doing this would be appreciated!

[Edit - Solution] So I posted my question to the Microsoft PowerAutomate forum and got an answer similar to the logic of u/tom_riha 's below, but using Compose blocks instead of init/set variable blocks.

So my flow is now as follows -

  • "HTTP Request/Webhook" trigger step

  • "Select" step

    • takes the very weirdly presented form data and matches the key:value pairs

    • outputs the array I mentioned above that I want to convert

  • "Compose" step

    • Uses expression string(body('Select')) which creates a string from the data (the array mentioned above) from the previous 'Select' step

  • "Compose 2" step

    • Uses expression json(replace(replace(replace(replace(outputs('Compose'),'{',''),'}',''),'[','{'),']','}')) which removes the {}'s, replaces the []'s with {}'s, and then uses the json function to convert the string from the previous "Compose" step's output back to a JSON object

    • The output of this step matches exactly what I was looking for.

  • "Parse JSON" step

    • Takes the JSON object/output from the "Compose 2" step and parses it into individual properties that I can feed to something like a CRM (I currently just have the Flow bot posting a message to a Teams user with the info for testing)

🌐
Tom Riha
tomriha.com › how-to-turn-array-of-objects-into-a-single-object-in-power-automate
How to turn array of objects into a single object in Power Automate
June 12, 2022 - I do hope my formatting of the WtfDL above stays somewhat preserved. Basically: 1) xmlify the JSON with prepended /root/arr element, 2) then select all the array’s sub-elements with xpath /root/arr/* 3) join the results with empty delim, wrap in another , convert from xml back to JSON, and select the .root!
🌐
YouTube
youtube.com › watch
Lesson65- Array To JSON - Power Automate 1000 Videos - YouTube
Description- Array To JSON - 65/1000 Power Automate Videos
Published: November 6, 2022
Find elsewhere
🌐
Never Stop Learning
never-stop-learning.de › home › extract ids as array in power automate
Extract IDs as Array in Power Automate
April 14, 2023 - Right, my data was an array of Json objects. Therefore, I used a Parse Json action from Data Operations to convert my example data into a Json object: You can skip this, when you already have for instance an output object. As next step I need the right transformation action from Data Operations: I used the action “Select” and switched the mode from “Map into text mode”: ... Afterwards, I verified the result by running this small Power Automate Flow in test mode.
🌐
Microsoft Power Platform
community.powerplatform.com › forums › thread › details
Solved: Array into json - Power Platform Community
August 7, 2024 - How do I convert this array (from append to array variable):["email1", "email2", "email3"]into this format:[{"address":"email1"},{"address":"email2"},
🌐
YouTube
youtube.com › watch
Mastering JSON Arrays & Email Lists Tutorial
Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.
🌐
EnjoySharePoint
enjoysharepoint.com › parse-json-object-to-array-in-power-automate
How to Parse JSON Object to Array in Power Automate
April 15, 2026 - Let’s say you’ve already parsed your JSON and have an Employees array in your dynamic content. To grab just the first employee’s name, use this in a Compose action: ... This pulls the first item from the array and then accesses its Name property. Clean, fast, no loop needed. ... Remember — arrays are zero-indexed in Power Automate.
🌐
Reddit
reddit.com › r/powerplatform › powerautomate: json array to string back to array. json() returns only first entry
r/PowerPlatform on Reddit: PowerAutomate: Json Array to String back to array. JSON() returns only first entry
December 15, 2021 -

So I've been trying to tackle this for a while and am a little stuck.

  1. The flow reads output from Excel into an Array (using Filter Array)

  2. I use String() to convert the Array to a single, very long string (Still in the jsonFormat)

So from

[{
"@odata.etag": "",
"Item": "12345",
"figures": "12",
"sourcename[Customername]": "Timmy"
},
{
"@odata.etag": "",
"Item": "567",
"figures": "9",
"sourcename[Customername]": "James"
}
]

This then becomes flat and is 1 very long string. (I can't use SELECT as Key names randomly have a prefix to them.

{"@odata.etag": "","Item": "12345","figures": "12","sourcename[Customername]": "Timmy"},{"@odata.etag": "","Item": "567","figures": "9","sourcename[Customername]": "James"}

3. I then use Compose > and the the replace() function to Analyse the long string and remove "Sourcename[" and ]

So far so good!

1 very long Json String and it's now in the right format (Customername)

--

This is where I run into trouble.

When I use Json() function to convert it back , I only get the very first Object (Where the customer name is Timmy.

anytime I use

json(outputs('compose_3')) 'Compose_3 being the very long Json string (string format).

I get this issue.

If I try splitting the string, I end up which a whole heap of "/" in the String (Which is what you expect when you convert a string to Array, you get a badly formatted Array.

"{\"@odata.etag\"\: \"\",\ etc These are escape characters in the backend (That compose normally filters out visually), but using the Split, it brings them to the front of view.

So I'm stuck on the correct way to handle this very long string and getting it to appear as multiple entries in ParseJson etc. I tried adding a manual "Apply To Each" but kept hitting the same issue with JSON() only returns Timmy and not any other records.

Any thoughts on what I can try here? This is the last step to get this working correctly.

🌐
PowerPlatformTip
powerplatformtip.com › home › posts › #powerplatformtip 71 – 'array to object'
#PowerPlatformTip 71 – 'Array to Object'
August 8, 2023 - Convert arrays to objects in Power Automate using Select and Replace actions for efficient data transformation, automation, and integration with downstream systems.
🌐
YouTube
youtube.com › shorts › LSmKT41tKBw
How To Convert String To JSON In Power Automate. - YouTube
In this video, we will learn How To Convert String To JSON In Power Automate.
Published: October 26, 2023
🌐
YouTube
youtube.com › watch
Power Automate – Extracting Values from JSON Array
Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.
🌐
YouTube
youtube.com › watch
Power Automate JSON Array Challenges: 5 Advanced Workflow Solutions Tutorial - YouTube
Level up your Power Automate game by mastering JSON arrays and objects—without endless Apply to Each loops! This hands-on tutorial dives into real-world work...
Published: August 28, 2022
🌐
Power Tech Tips
powertechtips.com › convert-object-to-array-power-automate
How to Convert an Object to Array in Power Automate - Power Tech Tips
November 27, 2022 - Most of the data you deal with in your flows will be a complex JSON object. For example, when you get items from a SharePoint list you might only be interested in the names or emails within a multiple choice person field, but these will be nested in an object of records and arrays. How can you get these names or emails into an array to use in other parts of your flow? This post will show you how to convert your complex objects to a simple array in Power Automate.
🌐
Reddit
reddit.com › r/microsoftflow › powerautomate: json array to string back to array. json() returns only first entry
r/MicrosoftFlow on Reddit: PowerAutomate: Json Array to String back to array. JSON() returns only first entry
December 16, 2021 -

So I've been trying to tackle this for a while and am a little stuck.

  1. The flow reads output from Excel into an Array (using Filter Array)

  2. I use String() to convert the Array to a single, very long string (Still in the jsonFormat)

So from

[{
"@odata.etag": "",
"Item": "12345",
"figures": "12",
"sourcename[Customername]": "Timmy"
},
{
"@odata.etag": "",
"Item": "567",
"figures": "9",
"sourcename[Customername]": "James"
}
]

This then becomes flat and is 1 very long string. (I can't use SELECT as Key names randomly have a prefix to them.

{"@odata.etag": "","Item": "12345","figures": "12","sourcename[Customername]": "Timmy"},{"@odata.etag": "","Item": "567","figures": "9","sourcename[Customername]": "James"}

3. I then use Compose > and the the replace() function to Analyse the long string and remove "Sourcename[" and ]

So far so good!

1 very long Json String and it's now in the right format (Customername)

--

This is where I run into trouble.

When I use Json() function to convert it back , I only get the very first Object (Where the customer name is Timmy.

anytime I use

json(outputs('compose_3')) 'Compose_3 being the very long Json string (string format).

I get this issue.

If I try splitting the string, I end up which a whole heap of "/" in the String (Which is what you expect when you convert a string to Array, you get a badly formatted Array.

"{\"@odata.etag\"\: \"\",\ etc These are escape characters in the backend (That compose normally filters out visually), but using the Split, it brings them to the front of view.

So I'm stuck on the correct way to handle this very long string and getting it to appear as multiple entries in ParseJson etc. I tried adding a manual "Apply To Each" but kept hitting the same issue with JSON() only returns Timmy and not any other records.

Any thoughts on what I can try here? This is the last step to get this working correctly.

🌐
Microsoft Learn
learn.microsoft.com › en-us › power-platform › power-fx › reference › function-parsejson
ParseJSON function - Power Platform | Microsoft Learn
Without the second argument, ParseJSON returns a Dynamic value which requires explicit conversion of field values in supported data types. The following table lists the data types in Power Apps and a corresponding JSON data type and how to convert it.
🌐
Dynamics Community
community.dynamics.com › blogs › post
Power Automate Fundamentals # 27: Usage of JSON Function ...
Conclusion: In this way we can use json function so that provided xml string or string values array can be converted to required json in power automate easily.