package play
exists(obj, a) {
obj[a]
}
hello {
exists(input, "department")
contains(input["location"], "London")
}
world {
contains(input["location"], "London")
exists(input, "department")
}
输入= {“部门”:“英语”,“位置”:“伦敦”}
上面的代码只匹配hello。为什么即使条件相同,世界也不匹配,但顺序颠倒了?