cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Highlighted
Lisabel0
Level 8

Re: Retain JSON formatting when using in Create file

1 REPLY 1
Highlighted
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
Users Online
Currently online: 223 members 5,998 guests
Please welcome our newest community members: