I have two 2D arrays, both of type String which I would like to join together. However, the catch is that I want to match up a column in each. For example;

(1)
A | B | C
D | E | F

(2)
F | A | B
C | D | E

When joining the two arrays on column 3 of (1) and 1 of (2), the result should be,

A | B | C | D | E
D | E | F | A | B

Does anyone know of an efficient way to do this?

Thanks

ps

Here is a bit of background info if you're interested. I have taken an XML file with all of Apples iTunes track information and stored in a 2D array in java. One of the columns in this array gives the location on the hard disk of each track.
I also have implemented some music information retrieval techniques to get coordinates of similarity between the songs and I have stored these along with their location in another 2D array in java.
So basically I have two 2D arrays, both of which have a column with the location of the file (which is the only way I could link the two sets of data up). I need to therefore match each tracks iTunes information with it's music properties.