从响应中获取带连字符的json值

时间:2018-10-02 12:54:25

标签: karate

我见过note about quoting json fields with hyphens,但是如果响应中带有连字符,我们如何从响应中访问json?

响应沿线

=IF(AND(E4>$A$5,E4>=A9),E4/C3*100,IF(AND(E4>$A$5,E4<$A$9),-E4/C3*100,"HELP"))

1 个答案:

答案 0 :(得分:2)

这应该有效,

* def response = { cancel-account: "Please don't do it!" }
* def cancelAccount = response['cancel-account']
* print cancelAccount