I have following list-
List((name1,233,33),(name2,333,22),(name3,444,55),())
I have another string which I want to match with list and get matched elements from list. There will be only one element in list that matches to given string.
The list may contains some empty elements as given as last element in above list.
Suppose I am maching string 'name2' which will occurs only once in the list, then My expected output is -
List(name2,333,22)
How do I find matching list element using scala??
.filter(_._1 == name2)?List(name2,333,22)or reallyList((name2,333,22))?