public class ArrayTest{
public static void main(String[] args){
String[] list = {"key1", "key2", "key3"};
String[] list2 = {"val1", "val2", "val3"};
for(int i = 0; i < list.length; i++){
ilike(list[i], list2[i];
}
}
}
How to write the above code in Groovy?
Actually, its a grails application where I want to do similar thing above.
You have a couple of options that come to mind…
Given:
Then you could do:
or assuming ilike is defined as:
Then you can do (using
transpose):