Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Help to Getting values from a Json

(0) ShareShare
ReportReport
Posted on by 182

Hey there,

 

i tried many things and i don´t get it running to final.

From Output of Compose which you see in Screenshot, i try to get Only the values from "TID" in a string seperatet by ",".

My Challenge are the empty bodys, i try much ways but i dont getting extract only the "Hard Values" from TID.

Maybe you can help me out ?

 

HansenvomDeich_0-1699900444925.png

 

  • Sundeep_Malik Profile Picture
    6,480 on at
    Re: Help to Getting values from a Json

    @HansenvomDeich 

     

    Can you send me the entire json data?

    Replace data with test data.

    I might be able to give you a better solution. 🙂

  • HansenvomDeich Profile Picture
    182 on at
    Re: Help to Getting values from a Json

    @Sundeep_Malik 

    sorry, getting still the same failure

    HansenvomDeich_0-1699958732718.pngHansenvomDeich_1-1699958746635.pngHansenvomDeich_2-1699958877107.png

    For Append Array Var i use was you told.
    items('Apply_to_Each_4')?['TID']

    (also try with 'ID' as you told but that runs also in an fail)

    This is the output from Parse JSON 2 if this could be fail Input:
    Step 1-3

    {
        "body": {
            "body": []
        }
    }
    Step 4
    {
        "body": {
            "body": [
                {
                    "TID""nHp0Qx0sdtest"
                }
            ]
        }
    }


  • Sundeep_Malik Profile Picture
    6,480 on at
    Re: Help to Getting values from a Json

    @HansenvomDeich 

     

    In the apply to each you have to write it as below:

     

    items('Apply_to_each_4')?['ID']

  • HansenvomDeich Profile Picture
    182 on at
    Re: Help to Getting values from a Json

    Hi @Sundeep_Malik ,

    at first thanks for your Help.

    I have build what u have suggest, i get an Fail in:
    (That is your Apply to Each 2 Loop)
    (Variable Test is your DIT Array Var)

    HansenvomDeich_0-1699948286245.png

    HansenvomDeich_1-1699948338168.pngHansenvomDeich_2-1699948348822.png

    Fail Message is:

    HansenvomDeich_3-1699948436965.png


    Step 4 Output from Parse_Json_2 is:

    {
        "body": {
            "body": [
                {
                    "TID""nHp0QaaaaaaaaaaaaG"
                }
            ]
        }
    }
     
    Step 2 Output is like:
    {
      "body": []
    }
  • Sundeep_Malik Profile Picture
    6,480 on at
    Re: Help to Getting values from a Json

    Hey @HansenvomDeich 

     

    For this you will have to use two parse JSON actions.

    Let me know if the below method works for you, if not can you send me the above json data. Hide or Replace the values that you dont want to show. [Replace them with Test data like abc]

     

    Compose Action:

    I have taken similar data like you:

     

    Sundeep_Malik_0-1699904588838.png

     

    Then I have initialized an empty array:

    Sundeep_Malik_2-1699904750026.png

     

     

     

    Then I have used Parse json action.

    Inside that I have passed the outputs of 1st compose.

    In schema I have added this:

    {
        "type""array",
        "items": {
            "type""object",
            "properties": {
                "body": {
                    "type""array"
                }
            },
            "required": [
                "body"
            ]
        }
    }
     
    Sundeep_Malik_3-1699904846975.png

     

     

     

    After this I used an item in compose coming from parse json.
    This will create a loop. 
    Sundeep_Malik_1-1699904656695.png

     

    After this I have taken another parse json action inside the loop. I have passed output of compose 2 in it.

    The schema looks like below:

     

    {
        "type""object",
        "properties": {
            "body": {
                "type""array",
                "items": {
                    "type""object",
                    "properties": {
                        "TID": {
                            "type""string"
                        }
                    },
                    "required": [
                        "TID"
                    ]
                }
            }
        }
    }
    Sundeep_Malik_4-1699904882862.png

     

     

    After this I have taken append to array action. And pass TID coming from parse json.
    This will create a loop.
     
    Sundeep_Malik_5-1699904897084.png

     

     

    After this outside the loop I have take a compose action and passed the variable in it to show you the output:

    Sundeep_Malik_6-1699904931806.png

     

     

    Final Output:

     

    Sundeep_Malik_7-1699904964211.png

     

     

    Let me know if it works or not.

     

    If this does not work, as I told you above send me your json data and replace the data with test data. 

     

    And I will be able to help.

     

     

    I hope this helps 🙂

  • Verified answer
    Sundeep_Malik Profile Picture
    6,480 on at
    Re: Help to Getting values from a Json

    Hey @HansenvomDeich 

     

    For this you will have to use two parse JSON actions.

    Let me know if the below method works for you, if not can you send me the above json data. Hide or Replace the values that you dont want to show. [Replace them with Test data like abc]

     

    Compose Action:

    I have taken similar data like you:

     

    Sundeep_Malik_0-1699904588838.png

     

    Then I have initialized an empty array:

    Sundeep_Malik_2-1699904750026.png

     

     

     

    Then I have used Parse json action.

    Inside that I have passed the outputs of 1st compose.

    In schema I have added this:

    {
        "type""array",
        "items": {
            "type""object",
            "properties": {
                "body": {
                    "type""array"
                }
            },
            "required": [
                "body"
            ]
        }
    }
     
    Sundeep_Malik_3-1699904846975.png

     

     

     

    After this I used an item in compose coming from parse json.
    This will create a loop. 
    Sundeep_Malik_1-1699904656695.png

     

    After this I have taken another parse json action inside the loop. I have passed output of compose 2 in it.

    The schema looks like below:

     

    {
        "type""object",
        "properties": {
            "body": {
                "type""array",
                "items": {
                    "type""object",
                    "properties": {
                        "TID": {
                            "type""string"
                        }
                    },
                    "required": [
                        "TID"
                    ]
                }
            }
        }
    }
    Sundeep_Malik_4-1699904882862.png

     

     

    After this I have taken append to array action. And pass TID coming from parse json.
    This will create a loop.
     
    Sundeep_Malik_5-1699904897084.png

     

     

    After this outside the loop I have take a compose action and passed the variable in it to show you the output:

    Sundeep_Malik_6-1699904931806.png

     

     

    Final Output:

     

    Sundeep_Malik_7-1699904964211.png

     

     

    Let me know if it works or not.

     

    If this does not work, as I told you above send me your json data and replace the data with test data. 

     

    And I will be able to help.

     

     

    I hope this helps 🙂

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >