您可以從傳遞的屬性數組中創建一個Map,并在將Object.entries映射到Map之后返回一個Object.fromEntries。這里使用concat也允許傳遞單個對象。 function remapProperties(objArray, mapping) { const propertyMap = new Map(mapping); return [].concat(objArray).map(o => Object.fromEntries( Object.entries(o).map(([k, v]) => [propertyMap.get(k) ?? k, v])) )}const input = [{ "id": 1, "name": "item1", "description": "test1" }, { "id": 2, "name": "item2", "description": "test2" }, { "id": 3, "name": "item3", "description": "test3" }];const propertyMapping = [["id", "id"], ["name", "order"], ["description", "task"]];console.log(remapProperties(input, pro