다음과 같은 것이 있습니다. 그것은 가라데가 'or'검색을 할 얻을 수 있나요 foo
과 bar
?
의미 - foo
으로 시작 fooStartWithChar
또는 bar
시작과 함께barStartWithChar
And match each response ==
"""
{
foo: '#? { _.charAt(0) == fooStartWithChar}',
bar: '#? { _.charAt(0) == barStartWithChar}',
}
"""
때때로 평범한 오래된 JS (+ Java)가 당신의 친구입니다.
* def response = [{ foo: 'aa', bar: 'bb' }, { foo: 'ax', bar: 'by' }]
* def isValid = function(x){ return x.foo.startsWith('a') || x.bar.startsWith('b') }
* match each response == '#? isValid(_)'
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다