I’m not 100% sure what you’re trying to accomplish… You’re searching for only the “1”, correct? So why are you feeding the 1034 item list into
String.Contains? With cross lacing, no less, which is why that list is 1.2 million items…
The reason you get so many
List.ContainsItem is because it looks likely that every sublist from the node before it contains at least one true because of the cross lacing. Every single combination is being matched- you might not even be looking at the item you’re looking for, just one that happens to line up with that index in a sublist.
If you want an exact match for “1” as a string, you should never end up with “0051”, so an ‘exact match’ is maybe not what you’re looking for to begin with…? Why aren’t you simply searching for “0051”?
You could try finding all items containing “1”, perhaps as the last character (
String.EndsWith node) and then filter that list for other requirements.
If it’s the smallest number you could even just sort and take the first item:
Again, though, it kind of depends on what exactly you’re trying to accomplish.