Forum Discussion
bojanvelevski
4 years agoValued Contributor
Hey @jpsheff,
This can be achieved by using the .reduce() function. After you transform the parameter to an object field, use the following expression:
$parameters.reduce((acc,curr)=> acc.replaceAll(curr.name,curr.value),$string1)
Here’s a pipeline with the exact samples you provided, that does the transformation:
Replace string values from Array_2022_02_22.slp (5.3 KB)
I would suggest not to pass the JSON object as a parameter, if possible.
Regards,
Bojan