Skip to main content
Community site session details

Community site session details

Session Id : ZhWnGEfmOHShqV5WSaFTVy
Power Automate - General Discussion
Answered

Create a valid JSON from append to array?

Like (0) ShareShare
ReportReport
Posted on 6 Jul 2023 11:27:06 by 1,095

I want to parse json the response from a array variable.

 

I create an array this way

Oskarkuus_0-1688642654585.png

 

 

I get the response like this:

 

[
 "[filename: l1,fileextension: l1.jpg,fileID:281]",
 "[filename: l2,fileextension: l2.jpg,fileID:282]",
 "[filename: l5,fileextension: l5.jpg,fileID:283]",
 "[filename: l3,fileextension: l3.jpg,fileID:284]",
 "[filename: l1,fileextension: l1.jpg,fileID:281]",
 "[filename: l2,fileextension: l2.jpg,fileID:282]",
 "[filename: l5,fileextension: l5.jpg,fileID:283]",
 "[filename: l3,fileextension: l3.jpg,fileID:284]",
 "[filename: l1,fileextension: l1.jpg,fileID:281]",
 "[filename: l2,fileextension: l2.jpg,fileID:282]",
 "[filename: l5,fileextension: l5.jpg,fileID:283]",
 "[filename: l3,fileextension: l3.jpg,fileID:284]",
 "[filename: l1,fileextension: l1.jpg,fileID:281]",
 "[filename: l2,fileextension: l2.jpg,fileID:282]",
 "[filename: l5,fileextension: l5.jpg,fileID:283]",
 "[filename: l3,fileextension: l3.jpg,fileID:284]"
]

 

 

But when i try to create a parse json and try to create a schema

power automate generate this schema:

 

 

{
 "type": "array",
 "items": {
 "type": "string"
 }
}

 

 

And that schema does not give me any dynamic options.

How to generate a standard json schema from my array?

 

Categories:
  • S-Venkadesh Profile Picture
    645 Super User 2025 Season 1 on 06 Jul 2023 at 12:45:13
    Re: Create a valid JSON from append to array?

    Hi @Oskarkuus ,

    Create a File object as below, add it to Array an then generate the schema from the output.
    {
    "filename": "abc",
    "fileId": "001"
    }

    SVenkadesh_0-1688647210100.png

     

    you schema will look like this:

    {
        "type""array",
        "items": {
            "type""object",
            "properties": {
                "filename": {
                    "type""string"
                },
                "fileId": {
                    "type""string"
                }
            },
            "required": [
                "filename",
                "fileId"
            ]
        }
    }

     

    I hope this information is helpful. If it is, please consider giving a thumbs up.

     

    Best regards,

    Venkadesh Sundaramurthy

  • Verified answer
    Chriddle Profile Picture
    7,932 Super User 2025 Season 1 on 06 Jul 2023 at 12:26:12
    Re: Create a valid JSON from append to array?

    Your appended value is a string, that's why you don't get the intended schema.

    Replace [ and ] with { and } and set the " accordingly

    to append an object like this:

     

    {"filename": "Value_from_dynamic _content1", "fileextension": "Value_from_dynamic _content2", "fileID": "Value_from_dynamic _content3"}

     

     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June 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 > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1