📅  最后修改于: 2022-03-11 15:02:36.584000             🧑  作者: Mango
const raw = {
item1: { key: 'sdfd', value:'sdfd' },
item2: { key: 'sdfd', value:'sdfd' },
item3: { key: 'sdfd', value:'sdfd' }
};
const allowed = ['item1', 'item3'];
const object = Object.fromEntries(
Object.entries(tt).filter(([key, value]) => currentInputs.includes(key))
);