web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Create a valid JSON fr...
Power Automate
Answered

Create a valid JSON from append to array?

(0) ShareShare
ReportReport
Posted on by 1,097

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:
I have the same question (0)
  • Verified answer
    Chriddle Profile Picture
    8,441 Super User 2025 Season 2 on at

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

     

     

  • S-Venkadesh Profile Picture
    927 Moderator on at

    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

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard