โ05-16-2023 10:06 AM
i trying to remove the โ\nโ character along with empty spaces from string thru mapper expression, but itโs not working.
Solved! Go to Solution.
โ05-17-2023 05:27 AM
You can use this expression: $JsonStr != null && $JsonStr != โโ ? $JsonStr .replaceAll(โ\nโ,โโ) : $JsonStr
Explanation: This will first check if the JsonStr is null or empty, if itโs not then itโll do the replacing else itโll just put input jsonStr as output. In your case where JsonStr is null itโll show output null
โ05-16-2023 10:17 AM
i changed expression as below, itโs working
JsonStr.toString().replaceAll(โ\nโ,โโ).replaceAll(โ โ,โ')
โ05-16-2023 10:33 AM
expression failing when input string contains blanks or null values using this expression โJsonStr.toString().replaceAll(โ\nโ,โโ).replaceAll(โ โ,โ')โ
any suggestions how to resolve this when we receive blank/null values?
โ05-17-2023 01:08 AM
Can you share example of input data(with blank/ null values)
โ05-17-2023 05:02 AM