如何在空手道中获取名称中包含@的JSON元素的值

How to get the value of JSON element having @ in the name in Karate

这是我的json回复

{
  "meta": {
 "type": "event-search",
 "@href": "https://<ip>:<port>/SentinelRESTServices/objects/event-search/10c21c52229bfe0545BD7802A74E10398534005056869AAA"
}
}

我想获取@href 的值。 当我打印 meta.type 时,我能够得到值 'event-search',但同样不适用于 @href.

我试图使用 \\ (meta.\\@href) 对其进行转义,但我得到的是空值。

有没有办法转义@并获取值?

请帮忙!!

当键名中有特殊字符时,请使用方括号JS方法提取嵌套属性。

示例:

* def response = { meta: { '@href': 'foo' } }
* match response.meta['@href'] == 'foo'