如何从对象访问对象数组?

时间:2016-01-21 16:02:52

标签: javascript json

我有来自后端的json响应它返回的对象,所以我在访问对象内的对象时遇到问题,所以在下面的情况下我想访问dataUploadLengthValidationDTOsVar响应返回对象但是如何我可以访问dataUploadLengthValidationDTOs的数据。

json.js

batchFileTypeKey: 3383
commentText: null
controlcount: null
createdUserText: null
currentInventoryControlcount: null
currentInventoryProcessCount: null
currentInventoryRiskCount: null
dataFile: null
dataLoadBatchKey: 2901
dataUploadLengthValidationDTOs: Array[2]
filename: "process_search_all_success_2.xlsx"
identifier: null
importSuccessFlag: true
lengthValidationError: true
loadSuccessFlag: false
originatingSrcSystemLkupCode: null
parentId: null
processCount: null
recordCount: 2
riskCount: null
templateType: "PRC Inventory"
templateTypeCode: "RA_PRC_INVNT_LOAD_FI"
userInitiatedImportFlag: false
validationMessage: "Failure"
validationSuccessFlag: false

mainctrl.js

var response = e.response;
console.log(response,'...recieved data from server');
console.log(response)

0 个答案:

没有答案