I have two Lists with diffeerent lenghts and want to check this value. It must be something list that:
List<String> first = new List<String>{'Test','Something'};
List<String> second = new List<String> {'es'}'
And comparing them must return me first element. So my only idea is to do that, but it seems too straightforward.
for(String s:first) {
for(String s2:second){
if(s.contains(s2)) {
//do something
}
}
}
System.Debug('Element:' + s);
on do something.