web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details
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:
  • Verified answer
    Chriddle Profile Picture
    7,932 Super User 2025 Season 2 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"}

     

     

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

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!

Loading complete