Hi! I have a problem with substituting a piece of string from my global json string. I have read different post in this Community and tried different solutions, but I have not been able to solve my problem.
I have this json string (this is only a part of the total string):
“door”:“1”,“postal_code”:“08017”},“persons”:{“propietario1”:{“name”:“antonio”,“surname”:“crespo”,
and I want to eliminate the block “propietario1”:
I have tried with:
strjson_muleta.ToString.Replace(Chr(34)+“Propietario1"+Chr(34)+“:”," ")
but when the debugger gets to the assign activity, it stops and shows this message: Assign: Expression Activity type ‘VisualBasicValue`1’ requires compilation in order to run. Please ensure that the workflow has been compiled.
Can anyone helpme to solve the problem? Thank you very much in advance. César
Hi Gokul! Thank you very much for your quick answer.
The quotation is what the Newtonsoft uses to convert a dictionary into a json strin variable so that I can use it into a call to an external API. I may have hundreds of double quotes as a result ot that operation I do not know how to change it.
Hi! I have been able to solve it by using Regex replace. This would be the expression:
System.Text.RegularExpressions.Regex.Replace(strjson_muleta,“”“propietario1"”“+”:“,”")
where strjson_muleta was my original string, and “propietario1”: the piece of text I wanted to eliminate.
Thank you very much Gokul for your help and kindness. César