HarriS
HarriS

Reputation: 850

Logic apps: Using expression to remove \n

I have a logic app that sends data to another logic app.

enter image description here

the data sent will always have \n\n at the end.

how do i clean it. i've tried using the replace function but it doesnt work.

replace(triggerBody()?['command'],'\n','')

Upvotes: 0

Views: 227

Answers (1)

HarriS
HarriS

Reputation: 850

this works Using the following expression cleans the string recieved from the HTTP post request above.

to reference \n the decodeUriComponent function is used where \n is represented as %0A

replace(triggerBody()?['command'], decodeUriComponent('%0A'), '')

Upvotes: 0

Related Questions