为什么“静态”为什么Array不使用GitHub包含工作流的表达式吗?
来自文档
contains('Hello world', 'llo')
contains(['6', '7', '8'], matrix.foo)
意外符号:'['。位于表达式中的位置10:包含(['6','7','8'],matrix.foo)
有任何方法可以检查该matrix.fo
o是6 7或8使用包含
?
From the documentation, this works:
contains('Hello world', 'llo')
However, this will not:
contains(['6', '7', '8'], matrix.foo)
Unexpected symbol: '['. Located at position 10 within expression: contains(['6', '7', '8'], matrix.foo)
Is there any way to check the that matrix.fo
o is either 6, 7, or 8 using contains
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
包含函数无法实现结果您还需要使用 fromjson 带有数组列表的功能。
在这种情况下,您的表达方式应该像这样:
相反:
如果您想看一下,我在这里对其进行了测试:
The contains function can't achieve the result you expect alone, you would also need to use the fromJson function with an array list.
In that case, your expression should instead look like this:
and the opposite like this:
I tested it here if you want to have a look: