I am working with two sets of data:
First Set:
let training = [
"Z1,1545 John Doe,P1",
"Z2,2415 Shane Yu,P2"
];
Second Set:
let skill = [
"P1, Shooting",
"P2, Passing",
];
I need to combine both arrays based on their P
number and exclude the P
from the training array.
Expected Result:
[
'Z1,1545 John Doe, P1, Shooting',
'Z2,2415 Shane Yu, P2, Passing'
]
Is there a method to achieve this using ES6?