Hi,
In a server action (in ODC), I need to convert a Text like this:
{""title"":""Test Title"",""description"":""Test Description""}
In this
{\"title\":\"Test Title \",\"description\":\"Test Description \"}
This means replace double quotes in \". I tried with the Replace, including use Chr() funtion, but nothing works. Anyone can help?
Thanks!
use the function replace, it has 3 parameters
1 the string to be replaced
2 the string to search
3 the string that will be used
Ex: replace("abcdea","a","A"), the output will be AbcdeA
Hope it helps you, regards
@carl ruhle I know the function and I tried with that. The problem is because of the quotes, is not that simple. Here's a screenshot of the error:
@Rui Sousa ,
I didn't want to offend you, sorry if I did offend, my apologies.
could you try this please
replace(JSON,"""",""\"")
or
replace(JSON,'""','\"') its a ' then "
Thanks
No problem @carl ruhle, you didn't :)
That one it's not not valid also:
Thanks.
Hi Rui,
Try below expressionReplace(JSON,"""""","\""")Output shown below:-
Regards,Krishnanand Pathak
Hi @Krishnanand Pathak,
Using that replace, the JSON stays the same... I don't know if is because the operation is made in a Library (server action).
Thanks,
Rui Sousa