Well, the problem is that indexOf and lastIndexOf only work on single rows. You could scan through with a loop, but my preferred solution would be to have a key.
e.g. suppose you have an array 3x2 or more
Joe, Smith, ...
Fred,Bloggs, ...
Jane,Jones, ...
Now create another array which is a combination of those e.g. a 3 x 1 array, by concatenating the two parts with a semicolon and making it all lower case.
joe;smith
fred;bloggs
jane;jones
then if you want to search on a pair, you can look for jane;jones in the key array and the index returned by indexOf should be the same as that in the 3x2 array. You have to be careful that if you manipulate the data array, you synchronise the key array with it. Partly how you do this depends how much your data changes.
This is (incidentally) how you used to do database systems before SQL became popular in the 1990s.