请问下列这个json数据怎么取到customer 里的数据

我用res.data.object.customer取出来的是undefined

{
"code": 1,
"message": "成功!",
"object": [
{
"tid": 41,
"status": 1,
"version": 0,
"createUser": 5,
"createTime": "2018-03-20 18:06:58",
"modifyUser": 5,
"modifyTime": null,
"modifyDescription": "初始创建",
"companyName": "",
"contactname": "",
"contactphone": "",
"companyAddress": "",
"time": "2018-03-20 19:00",
"longitude": 121.174228,
"latitude": 31.146823,
"employeeId": 584,
"vendorId": 5,
"customerId": 23,
"remark": "11",
"signin": 0,
"signout": 0,
"signPhoto": "",
"signoutPhot": "",
"resultmark": "",
"signRemark": "",
"signlat": null,
"signlon": null,
"signoutlat": null,
"signoutlon": null,
"signtime": null,
"signouttime": null,
"customer": {
"tid": 23,
"status": 1,
"version": 3,
"createUser": null,
"createTime": "2018-02-28 09:46:36",
"modifyUser": 5,
"modifyTime": "2018-03-12 11:51:21",
"modifyDescription": "初始创建",
"name": "花惠狗",
"cellNumber": "13888888888",
"cellNumber2": "",
"cellNumber3": "",
"cellNumber4": "",
"cellNumber5": "",
"address": "上海市青浦区移动智地1号楼409",
"remark": null,
"photourl": "/upload/customer/1519782396251.jpg",
"ownername": "上海花惠狗信息科技有限公司",
"telephone": "18818881888",
"weixin": null,
"floor": "0",
"longitude": 121.174228,
"latitude": 31.146823,
"vendorId": 5,
"area": null,
"fax": null,
"email": null,
"level": null,
"customerType": null,
"state": null,
"scale": null,
"industry": null,
"employeeId": 584,
"employeeName": null,
"contactperson": "花总",
"contactperson2": "",
"contactperson3": "",
"contactperson4": "",
"contactperson5": "",
"businessLicense": "",
"authTime": "",
"authPerson": "",
"customerSource": "",
"customerSourceDsc": "",
"invoiceHead": "",
"customerBank": "",
"customerBankAccount": "",
"invoicType": "",
"saleEmpId": "584",
"conserveEmpId": "763,764",
"visitEmpId": "586",
"saleEmpIdName": null,
"conserveEmpIdName": null,
"visitEmpIdName": null,
"diffPrice": 0,
"distance": 500,
"isBonsai": 0,
"userDefine3": "",
"userDefine4": "",
"userDefine5": "",
"userDefine6": "",
"userDefine7": "",
"userDefine8": "",
"userDefine9": "",
"userDefine10": "",
"userDefine11": "",
"userDefine12": "",
"userDefine13": "",
"userDefine14": "",
"userDefine15": "",
"userDefine16": "",
"userDefine17": "",
"userDefine18": "",
"userDefine19": "",
"userDefine20": ""
},
"employee": {
"tid": 584,
"status": 1,
"version": 0,
"createUser": 5,
"createTime": "2018-02-28 00:17:25",
"modifyUser": 5,
"modifyTime": null,
"modifyDescription": "初始创建",
"userno": "HHG005",
"name": "邓轩-销售",
"gender": 1,
"idnumber": "432822198502020202",
"brithday": "",
"brithplace": "",
"household": null,
"houseaddress": "",
"qualification": null,
"onboarddate": "",
"state": 1,
"shortphone": "",
"cellnumber": "13888888888",
"contactaddress": "",
"levelname": null,
"post": null,
"emergencycell": "",
"email": "",
"deptId": null,
"vendorId": 5,
"departmentId": 6,
"parentDepartmentId": null,
"deptName": null
}
}
],
"map": {}
}

0

2个回答

object是数组,要去数组项的JSON对象

 res.data.object[0].customer
6

res.data.object[0].customer

0
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!