cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TSYong
Helper II
Helper II

Convert string into parsable json format and get the dynamic content from within

Hi guys.

 

I have this string below that I'd like to convert into json format. 

I'd also like to be able to retrieve the secondary contact, primary contact, and owner dynamic values at later part of the flows. 

How would I do so?

 

["primarycontact:pri@nus.edu.sg","secondarycontact:sec@nus.edu.sg","owner:own@nus.edu.sg","notApiConsumer","webApp"]
3 REPLIES 3
v-bofeng-msft
Community Support
Community Support

Hi @TSYong :

Strictly speaking, the text you provide is already in JSON format, which is an Array with 5 strings.

If you want to activate dynamic content, then you first need to give the value field name and then build the Object.The problem is that I don’t know what field names should be assigned to "notApiConsumer" and "webApp", so I filtered them out in my solution. I've made a test for your reference:

vbofengmsft_1-1628748934429.png

vbofengmsft_2-1628749049346.png

vbofengmsft_3-1628749090331.png

Parse JSON 2 Schema:

{
    "type": "object",
    "properties": {
        "primarycontact": {
            "type": "string"
        },
        "secondarycontact": {
            "type": "string"
        },
        "owner": {
            "type": "string"
        }
    }
}

The Result:

The JSON should be something like:

{"primarycontact":"pri@nus.edu.sg","secondarycontact":"sec@nus.edu.sg","owner":"own@nus.edu.sg"}

vbofengmsft_4-1628749189822.png

Dynamic content:

 

vbofengmsft_0-1628748691828.png

Best Regards,

Bof

 

Hi @v-bofeng-msft ,

 

The string comes like that because it is from the tag object from a graph api response. I tried your solution with my full string, however, when using the full string, the solution fails.

Hi @TSYong :

Sorry, I can not know your actual situation, so I can only help based on the limited information you provided. I suggest that you provide a more specific description

Best Regards,

Bof

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,877)