JavaScript对象过滤掉部分属性 2023-04-10 19:46:24 示例 let device = { name: '设备1', code: '867725031691391', date: '1525835791000' } const obj = (({name, date}) => ({name, date}))(device) console.log(obj) // { name: '设备1', date: '1525835791000' } let { code, ...obj } = device console.log(obj) // { name: '设备1', date: '1525835791000' }