📅  最后修改于: 2022-03-11 15:02:27.090000             🧑  作者: Mango
var ab = {
firstName : undefined,
lastName : undefined
}
let newJSON = JSON.stringify(ab, function (key, value) {return (value === "") ? undefined : value});
console.log(JSON.parse(newJSON))