[
[["A"], ["hello"]],
[["B"], ["hello"]],
[["V"], ["hello"]],
[["C"], ["bye"]],
[["G"], ["hello"]],
];
let strings = ["A-V : hello", "C : bye", "G : hello"];
arr.reduce((acc, [[key], [value]]) => {
if(acc[acc.length - 1]?.[1] === value) {
acc[acc.length - 1][0][1] = key;
}
else {
acc.push([[key], value]);
}
return acc;
}, []).map(([keys, value]) => `${keys.join('-')} : ${value}`)