cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

Microsoft Flow: How to Concatenate Data from JSON Object

I have a REST Web Services Call that is returning data in the following format:

 

 

{
    "Id": "0497cee4-45dc-47d8-97a8-b45ad8018775",
    "Status": "OK",
    "ProviderName": "MyApp",
    "DateTimeUTC": "/Date(1508348383277)/",
    "Contacts": [
        {
            "ContactID": "1efa0ea1-de5c-4172-869c-816e27c3c825",
            "ContactStatus": "ACTIVE",
            "Name": "Company",
            "FirstName": "Joe",
            "LastName": "Bob",
            "EmailAddress": "mainguy@here.com",
            "BankAccountDetails": "",

            "ContactPersons": [
                {
                    "FirstName": "Operations",
                    "LastName": "",
                    "EmailAddress": "there@here.com",
                    "IncludeInEmails": true
                },
                {
                    "FirstName": "Another",
                    "LastName": "Contact Email",
                    "EmailAddress": "here@there.com",
                    "IncludeInEmails": true
                }
            ],
            "HasAttachments": false,
        }
    ]
}

 

Within Microsoft Flow I would like to grab the main contact email (Contacts.EmailAddress) as well as all of the secondary Contacts Emails (Contacts.ContactPersons[x].EmailAddress); and use that for the too field of down-flow email.

ContactPersons will not always be defined in every case, but Contacts.EmailAddress should be.

What is the best way to do this with a flow? Is there a way to concatenate data over a loop or something? I can't seem to find a way to do it.

 

Repost of:
https://stackoverflow.com/questions/46816913/microsoft-flow-how-to-concatenate-data-from-json-object

 

Since apparently this is the "official" place for MS Flow related questions.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Microsoft Flow: How to Concatenate Data from JSON Object

Hi @DougL,

 

I think you have found the solution:

https://powerusers.microsoft.com/t5/Building-Flows/How-to-Extract-an-Array-from-a-JSON-Object-to-Use...

Using the Parse JSON and then an Apply to each, you should be able to get each of the Email Address from the contacts.

Post back if you have any further questions.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Microsoft Flow: How to Concatenate Data from JSON Object

Hi @DougL,

 

I think you have found the solution:

https://powerusers.microsoft.com/t5/Building-Flows/How-to-Extract-an-Array-from-a-JSON-Object-to-Use...

Using the Parse JSON and then an Apply to each, you should be able to get each of the Email Address from the contacts.

Post back if you have any further questions.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Frequent Visitor

Re: Microsoft Flow: How to Concatenate Data from JSON Object

How to get those Email Address in one variable to use further like To send emails in one go as a group 

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (5,988)