Forum Discussion

krondordkd's avatar
14 years ago

How to Set Rest Values

How do you go about changing a REST/JSON value?

With XML I used:
context.holder = new com.eviware.soapui.support.GroovyUtils(context).getXmlHolder("TESTSTEP#Request")
context.holder["//FOO"] = "BAR"
context.holder.updateProperty()

But that is for XML, is there something similar for REST?

I am wanting to understand how I would insert a new key and value or replace a value.

{
FOO:
BAR:
[
BOB:"TEXT",
FRANK:"TEXT
]
}

1 Reply