cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Yvonne11
Level: Power Up

Retain JSON formatting when using in Create file

Hi,

 

I have a JSON response from a HTTP request which I want to retain the formatiing on. What I am experiencing is that when I place my JSON into a file content it flattens it onto one line. I need it formatted as JSON as I am subsequently using it for a PowerShell.

 

I need to retain the json on separate lines like this
{
"mail": "pretend@email adress",
"otherMails": "pretend@email adress"
},
{
"mail": "pretend@email adress",
"otherMails": "pretend@email adress"
}

 

However when I place it into the file content it always saves on one line.
Screenshot 2019-09-03_17-44-33-217.pngScreenshot 2019-09-03_17-40-56-719.pngScreenshot 2019-09-03_17-42-33-493.pngScreenshot 2019-09-03_17-43-07-047.png

When I use the create file action I create the outer JSON manually then place the variable in the middle.

Screenshot 2019-09-03_17-52-29-149.png

 

Thanks,

Yvonne

 

1 ACCEPTED SOLUTION

Accepted Solutions
Lisabel0
Level 8

Re: Retain JSON formatting when using in Create file

1 REPLY 1
Lisabel0
Level 8

Re: Retain JSON formatting when using in Create file

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (6,278)