let data = {"terminalCode":"T0014077","terminalName":"测试门店4","licenseName":"山西太原XXX超市","terminalAddress":"山西太原杏花岭","shopkeeperName":"马宇","shopkeeperPhone":"13766662222","licenseCode":"ADEAF546656","licenseAddress":null,"channelType":"01","marketTypeCode":"S001","endTime":"2019-11-30"} let arr = {} for(let key in data){ arr[key] = data[key]?data[key]:'' } console.log(arr)