Hi everyone.
So I wanted to remove the first and the last character in a value, it's a JSON format that I obtained from an API. Apparently it returned some escape strings that should be removed to deserialize the response. Example:
"{\"20200619114321\":{\"absensi_date\":\"19-JUN-2020\",\"status_clock_out\":null}}"
I want to remove the double quote in the value. What function should I use? Replace? Substr? thanks.
See below formula,
Val - your string.
SyntaxEditor Code Snippet
Substr(Val,1,Length(Val)-1)
Aditya Eka Prabowo wrote:
Hi,
Use Substr and Length function to remove first and last character from the string.
Thanks!
See above snap and follow the OutSystems documentation,
https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Logic/Built-in_Fu
Thanks
hI aDITYA,
Based on your string you need to use this
Substr(Txt,1,Length(Txt)-2)
where "txt" is your string.
regards
Rahul Sahu
Hi Jitendra and Rahul, thanks this problem is solved. Actually this is the alternative to my primary case, which leads to this post: https://www.outsystems.com/forums/discussion/62041/response-value-of-an-api-is-a-plaintext-can-i-create-a-list-from-it/
Anyway thanks again for the answers.