Here is the complete code for replacing keys based on an object that displays the values to replace:
const tab = {abc: 1, def: 40, xyz: 50};
const replacements = {'abc': 'a_b_c', 'def': 'd_e_f'};
let replacedItems = Object.keys(tab).map((key) => {
const newKey = replacements[key] || key;
return { [newKey] : tab[key] };
});
, . , :
const newTab = replacedItems.reduce((a, b) => Object.assign({}, a, b));
: {"a_b_c": 1, "d_e_f": 40, "xyz": 50}