我正在计算列表中重复的值。
[
"Cloud Services - Hybrid and Azure",
"Cloud Services - Hybrid and Azure",
"Cloud Services - Hybrid and Azure",
"Cloud Services - Hybrid and Azure",
"Application Development",
"Application Development",
"Application Development",
"CAB Approval"
]我希望输出是“混合和Azure”=4
karate.distinct() throws error. any help on this is much appreciated.
I tried to take unique values : 发布于 2022-11-12 12:15:40
只需使用JS数组操作,要简单得多:
* def result = data.filter(x => x == 'Application Development')
* assert result.length == 3https://stackoverflow.com/questions/74412715
复制相似问题