you first learn how to search string from 2d array and then you fetch the other items depends on the searching string
Searching a 2d Array (Java) for an element - Stack Overflow