amirse
4 years agoContributor
Replace one part in a request with the value from an variable
Hi,
Is there a way to replace the "XXXX" in the method below with the value of the variable replaceToken?
def replaceToken = "username"
parsedJson.secrets.XXXX.toString()
I.e., I would like to achieve following automatically
parsedJson.secrets.username.toString()
Seems like an easy thing when working with strings but when I want to have it in a call then it always interprets the replaceToken as "replaceToken" and not "username"