Forum Discussion

TomA's avatar
TomA
New Contributor
2 years ago

Performing a JsonPath replacement in groovy

The following code works in a groovy step, but if you notice, I am replacing an element by hard position referencing i.e. references[0]: json.cEntity.references[0].userValue = "newID_ONE###"     ...
  • nmrao's avatar
    2 years ago

    You can try the below

    json.cEntity.references.find{it.name == 'ID_ONE'}.userValue = "newID_ONE###"