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
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

🌐
C# Corner
c-sharpcorner.com › home › technologies › power apps › convert string to json using power automate microsoft flow
Convert String to JSON using Power Automate Microsoft Flow
October 18, 2023 - Step 2. After completing step 1, select New Flow, Instant Flow, and then Manually trigger a flow under the option Choose how to trigger the flow. Then, click Create, as shown in the below diagram. Step 3. Create a string variable and set its initial value to the JSON object.
Discussions

PowerAutomate: Json Array to String back to array. JSON() returns only first entry
Sorry for the cross post, but it was recommended that I post this here as well More on reddit.com
🌐 r/MicrosoftFlow
10
2
December 16, 2021
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
Using a Power Automate flow, how do I convert JSON array to a delimited string? - Stack Overflow
3 Convert JSON array object to String in Powershell · 0 Struggling to process JSON with MS-Flow - Power Automate More on stackoverflow.com
🌐 stackoverflow.com
Parse JSON output into a usable string
Hi,My objective is to retreive and display two fields (webLink and toRecipient:name) from a emails in a shared mailbox to be used in an HTML table. Ho More on community.powerplatform.com
🌐 community.powerplatform.com
January 24, 2019
🌐
Microsoft Power Platform
community.powerplatform.com › forums › thread › details
Converting String to JSON Object
I have a child flow that produces a string value based on the outcome of a loop that checks for data consistency across multiple tables and returns that string looking a bit like this : · As you can see, this is essentially a JSON object that I want to then inject into an Adaptive Card (Teams), ...
🌐
YouTube
youtube.com › watch
Power Automate Desktop Actions - Convert a Custom Object to JSON - YouTube
This video will will explain how to change Custom Objects to JSON using the Convert Custom Object to JSON action on Power Automate Desktop.Connect with me:We...
Published: February 24, 2022
🌐
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.
🌐
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
🌐
SPGuides
spguides.com › convert-string-to-object-in-power-automate
How to Convert String to Object in Power Automate
October 31, 2023 - The JSON() will take the value as a string and convert it into a Json object. ... How to convert string to object in Power Automate.
Find elsewhere
🌐
JD Bots
jd-bots.com › 2021 › 10 › 17 › convert-string-to-json-using-power-automate-microsoft-flow-work-with-parse-json
Convert String to JSON using Power Automate Microsoft Flow | Work with Parse JSON - JD Bots
October 17, 2021 - Convert a string having the JSON content to JSON object using Power Automate Microsoft Flow (MS Flow). We will work with the JSON Object and not the JSON Array.
🌐
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. Given the following JSON string in a variable named JsonString
🌐
Jon Does Flow
jondoesflow.com › post › retrieve-values-as-a-concatenated-string-from-json-object
Retrieve values as a concatenated string from JSON object
April 30, 2023 - No not that JASON !How are you doing?I was on the Power Automate forums today and came across this post:Multiselect choice column in SharePoint returning array using Get item trigger; need to convert this into a string separated by commas. I thought I would write a quick blog post to explain what I did to achieve the intended result.The poster, was asking for a value from a JSON array to be extracted and then concatenated into a string.First of all, I set up an Instant Cloud flow, then I created
🌐
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.

🌐
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.

🌐
C# Corner
c-sharpcorner.com › article › usage-of-json-function-in-power-automate
Usage Of JSON Function In Power Automate
October 29, 2021 - In this way, we can use the JSON function so that provided XML string or string values array can be converted to required JSON in power automate easily.
🌐
Microsoft Power Platform Community
powerusers.microsoft.com › t5 › General-Power-Automate › Convert-String-to-Json › td-p › 1280373
Forums | Microsoft Power Platform Community
Power Platform school works with adults from the BAME (Black, Asian and Minority Ethnic) community, providing training on the Power Platform as well as mentorship from industry professionals during an 8-week program.
🌐
Microsoft Power Platform
community.powerplatform.com › forums › thread › details
Parse JSON output into a usable string
January 24, 2019 - Hi,My objective is to retreive and display two fields (webLink and toRecipient:name) from a emails in a shared mailbox to be used in an HTML table. Ho
🌐
Manuel T Gomes
manueltgomes.com › home › microsoft › power platform › power automate › power automate function reference
Power Automate json() Function: Syntax & Examples
May 28, 2026 - Power Automate's json function converts strings to JSON objects, validates structure, and formats output. Also works with XML-to-JSON conversion.
🌐
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.
🌐
LinkedIn
linkedin.com › pulse › power-automate-easy-way-generate-json-objects-peter-mesiha-p-eng
Power Automate - An easy way to generate JSON objects without worrying about special characters
May 12, 2023 - Today, i will show you a simple and efficient way to do it, my case was for a simple key/value pair JSON, but the same approach can be used with more complex objects. ... Under the "Map" section, start adding your JSON fields and values.