Escape characters within JSON object not working, even when converted to a string

Logan3
Kilo Explorer

Hello,

Using Flow Designer, I'm trying to update the work notes field of an Alert with the response body from a REST step. This is fine, but the resulting work note ignores escape characters, specifically "\n".

Is there a reason this could be happening, and is there a workaround to get escape characters to work?

I have tried manually converting the JSON object to a string using .stringify(), but the same issue remains. I've tried escaping the escape with "\\n". The same issue is occurring when updating an Alert manually through a glide record object.

Thank you.

6 REPLIES 6

Ct111
Tera Sage

Priya Shid1
Kilo Guru

Hi ,

In case of json suppose ,

 "FirstName": "\nTanmay",

o/p will be,

FirstName:\nTanmay

so when you stringify(); ' \nTanmay ' will be your value for FirstName,Please check for this and update.

 

 

Hi Priya,

Correct, once stringified the "\n" is visible in the output as part of the string.

For your example, the output that we get is:

"\nTanmay"

The output we would want is:

"

Tanmay"

Ashutosh Munot1
Kilo Patron
Kilo Patron

Hi,

What about <br/>?

 

Thanks,
Ashutosh