空手道框架 - 如何检查属性的两个字符串的条件或

Karate framework - How to check conditional OR for two string for a attribute

我想比较两个字符串并需要检查属性的任何字符串值,如下所示:"firstName": "#? _ == '#string1' || _ == '# string2'".

这是我在JSON中提供的,如下

{
  "id":"#number",
  "firstName":"#string",
  "lastName":"#string",
  "city":  "#? _ == '#Boston' || _ == '#Bijing'"
}

但它不是在比较字符串?请帮忙。我在这里纠正一下。

如果字符串不是变量引用

,则无需在字符串前使用 #
{
  "id":"#number",
  "firstName":"#string",
  "lastName":"#string",
  "city":  "#string? _ == 'Boston' || _ == 'Bijing'"
}