📅  最后修改于: 2022-03-11 15:01:53.533000             🧑  作者: Mango
var parsedJson = JSON.parse(json_text);
Result = Object.keys(parsedJson[0]).reduce((acc, key) => {
acc[key] = parsedJson.map(item => item[key])
return acc
}, {})
console.log(JSON.stringify(Result,undefined, 4));