const data = [ { '姓名':'小王', '年龄':18, '手机号':12345 }, { '姓名':'花花', '年龄':29, '手机号':78789 }, ] const diff = { '姓名':'name', '年龄':'age', '手机号':'phone' } const arr = [] function pei() { data.forEach(item => { let obj = {} for (key in diff){ obj[diff[key]] = item[key] } arr.push(obj) }) } pei() console.log(arr) const array = data.map(item =>{ let obj = {} for (key in diff){ obj[diff[key]] = item[key] } return obj }) console.log(array)