I have seen the note about quoting json fields with hyphens but how do we access json from the response if it has hyphens?
Response is along the lines of
{ cancel-account: "Please don't do it!" }
This should work,
* def response = { cancel-account: "Please don't do it!" } * def cancelAccount = response['cancel-account'] * print cancelAccount
2.1m questions
2.1m answers
60 comments
57.0k users