Thanks.
I have kind of got it to work, but now i have the issue below
I have two arrays.
Array 1 is the first output. and Array 2 is the bottom output (With the formatting)

I have a If condition written where if the numbers match, then do this etc.
If you look at the top output and the bottom output, they look the same, but the bottom output is formatted as XML, therefore i beleive the condition is not picking them up as the same.
Any ideas on how to resolve that? (p.s i can assure you the employeeNumber is exactly the same in both outputs - i just crossed it out)