如何在空手道中匹配以下内容 [英] How to match the following in karate
本文介绍了如何在空手道中匹配以下内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的数据库输出如下{web,app}
响应的输出如下["web","app"]
如何在空手道中匹配这两个?
How to match these two in karate?
推荐答案
您的数据库输出{web,app}
没有遵循任何适当的数据结构.
Your database output {web,app}
doesn't follow any proper data structure.
很难对此进行迭代.
我认为它是String
如果是字符串,则编写一个js以将其作为方便的数据结构(数组)
if it is a string you write a js to get that as a convenient data structure (array)
* def pList = function(x) { return x.replace("{","").replace("}","").split(",") }
现在将您的特定值传递给此函数,它将为您提供一个值数组,您可以轻松地match
now pass your particular value to this function and it would give you an array of values which you can easily match
这篇关于如何在空手道中匹配以下内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文