gpt4 book ai didi

javascript - 如何在 $scope 中分离 get http 请求中的 json 对象?

转载 作者:行者123 更新时间:2023-12-03 05:21:21 25 4
gpt4 key购买 nike

    [{
"entityList": [
{
"scenarioNo": "SC1",
"accountingMonExtracted": null,
"acronym": null,
"address1": "542 W 27th Street 4th Floor",
"address2": null,
"addressType": "MAILING",
"alternateEmailId": null,
"alternateFaxNo": null,
"alternatePhoneNo": null,
"city": "Bethlehem",
"country": "US",
"county": null,
"firstName": "Thomas",
"fullName": "Peter Jen",
"lastName": "Routher",
"middleName": null,
"namePrefix": null,
"nameSuffix": null,
"primaryAddressYN": "Y",
"primaryEmailId": "johnmann@yahoo.com",
"primaryFaxNo": "(406)485-2983",
"primaryPhoneNo": "(405)452-3645",
"state": "AB",
"zipCode": "40007.0",
"agentType": null,
"autoCommClosingDays": null,
"autoCommExtractionYN": null,
"billingContactName": "Peter Jen",
"commissionCurrency": null,
"commissionEFTTokenId": null,
"commissionEntityYN": null,
"commissionPayeeEntityCode": null,
"commissionPayeeEntityType": null,
"commissionPaymentMethod": null,
"commissionStatementEntityCode": null,
"commissionStatementEntityType": null,
"creditTermDays": null,
"creditTermMonths": null,
"customerNo": null,
"doingBusinessAsName": null,
"eftDraftOption": null,
"entityType": "INSURED",
"frequencyDayMonth": null,
"frequencyDayOfWeek": null,
"frequencyType": null,
"invoiceCurrency": "USD",
"ncanGraceDays": null,
"outputDeliveryMethod": "M",
"parentEntityCode": null,
"paymentMethod": "EFT",
"process1099Indicator": "N",
"recurringEFTTokend": null,
"requestedDueDay": null,
"sourceSystem": "DPAS",
"sourceSystemEntityCode": "INS000020",
"statementFormat": null,
"statementIndicatorYN": "N",
"statementMailingDay": null,
"userRemarks": null,
"vendorCode": null,
"ssn": null,
"taxid": null
},
{
"scenarioNo": "SC2",
"accountingMonExtracted": null,
"acronym": null,
"address1": "542 W 27th Street 4th Floor",
"address2": null,
"addressType": "MAILING",
"alternateEmailId": null,
"alternateFaxNo": null,
"alternatePhoneNo": null,
"city": "Bethlehem",
"country": "US",
"county": null,
"firstName": "Thomas",
"fullName": "Peter Jen",
"lastName": "Routher",
"middleName": null,
"namePrefix": null,
"nameSuffix": null,
"primaryAddressYN": "Y",
"primaryEmailId": "johnmann@yahoo.com",
"primaryFaxNo": "(406)485-2983",
"primaryPhoneNo": "(405)452-3645",
"state": "AB",
"zipCode": "40007.0",
"agentType": null,
"autoCommClosingDays": null,
"autoCommExtractionYN": null,
"billingContactName": "Peter Jen",
"commissionCurrency": null,
"commissionEFTTokenId": null,
"commissionEntityYN": null,
"commissionPayeeEntityCode": null,
"commissionPayeeEntityType": null,
"commissionPaymentMethod": null,
"commissionStatementEntityCode": null,
"commissionStatementEntityType": null,
"creditTermDays": null,
"creditTermMonths": null,
"customerNo": null,
"doingBusinessAsName": null,
"eftDraftOption": null,
"entityType": "INSURED",
"frequencyDayMonth": null,
"frequencyDayOfWeek": null,
"frequencyType": null,
"invoiceCurrency": "USD",
"ncanGraceDays": null,
"outputDeliveryMethod": "M",
"parentEntityCode": null,
"paymentMethod": "EFT",
"process1099Indicator": "N",
"recurringEFTTokend": null,
"requestedDueDay": null,
"sourceSystem": "DPAS",
"sourceSystemEntityCode": "INS000040",
"statementFormat": null,
"statementIndicatorYN": "N",
"statementMailingDay": null,
"userRemarks": null,
"vendorCode": null,
"ssn": null,
"taxid": null
},
{
"scenarioNo": "SC3",
"accountingMonExtracted": null,
"acronym": null,
"address1": "542 W 27th Street 4th Floor",
"address2": null,
"addressType": "MAILING",
"alternateEmailId": null,
"alternateFaxNo": null,
"alternatePhoneNo": null,
"city": "Bethlehem",
"country": "US",
"county": null,
"firstName": "Thomas",
"fullName": "Peter Jen",
"lastName": "Routher",
"middleName": null,
"namePrefix": null,
"nameSuffix": null,
"primaryAddressYN": "Y",
"primaryEmailId": "johnmann@yahoo.com",
"primaryFaxNo": "(406)485-2983",
"primaryPhoneNo": "(405)452-3645",
"state": "AB",
"zipCode": "40007.0",
"agentType": null,
"autoCommClosingDays": null,
"autoCommExtractionYN": null,
"billingContactName": "Peter Jen",
"commissionCurrency": null,
"commissionEFTTokenId": null,
"commissionEntityYN": null,
"commissionPayeeEntityCode": null,
"commissionPayeeEntityType": null,
"commissionPaymentMethod": null,
"commissionStatementEntityCode": null,
"commissionStatementEntityType": null,
"creditTermDays": null,
"creditTermMonths": null,
"customerNo": null,
"doingBusinessAsName": null,
"eftDraftOption": null,
"entityType": "INSURED",
"frequencyDayMonth": null,
"frequencyDayOfWeek": null,
"frequencyType": null,
"invoiceCurrency": "USD",
"ncanGraceDays": null,
"outputDeliveryMethod": "M",
"parentEntityCode": null,
"paymentMethod": "EFT",
"process1099Indicator": "N",
"recurringEFTTokend": null,
"requestedDueDay": null,
"sourceSystem": "DPAS",
"sourceSystemEntityCode": "INS000060",
"statementFormat": null,
"statementIndicatorYN": "N",
"statementMailingDay": null,
"userRemarks": null,
"vendorCode": null,
"ssn": null,
"taxid": null
},
{
"scenarioNo": "SC4",
"accountingMonExtracted": null,
"acronym": null,
"address1": "542 W 27th Street 4th Floor",
"address2": null,
"addressType": "MAILING",
"alternateEmailId": null,
"alternateFaxNo": null,
"alternatePhoneNo": null,
"city": "Bethlehem",
"country": "US",
"county": null,
"firstName": "Thomas",
"fullName": "Peter Jen",
"lastName": "Routher",
"middleName": null,
"namePrefix": null,
"nameSuffix": null,
"primaryAddressYN": "Y",
"primaryEmailId": "johnmann@yahoo.com",
"primaryFaxNo": "(406)485-2983",
"primaryPhoneNo": "(405)452-3645",
"state": "AB",
"zipCode": "40007.0",
"agentType": null,
"autoCommClosingDays": null,
"autoCommExtractionYN": null,
"billingContactName": "Peter Jen",
"commissionCurrency": null,
"commissionEFTTokenId": null,
"commissionEntityYN": null,
"commissionPayeeEntityCode": null,
"commissionPayeeEntityType": null,
"commissionPaymentMethod": null,
"commissionStatementEntityCode": null,
"commissionStatementEntityType": null,
"creditTermDays": null,
"creditTermMonths": null,
"customerNo": null,
"doingBusinessAsName": null,
"eftDraftOption": null,
"entityType": "INSURED",
"frequencyDayMonth": null,
"frequencyDayOfWeek": null,
"frequencyType": null,
"invoiceCurrency": "USD",
"ncanGraceDays": null,
"outputDeliveryMethod": "M",
"parentEntityCode": null,
"paymentMethod": "EFT",
"process1099Indicator": "N",
"recurringEFTTokend": null,
"requestedDueDay": null,
"sourceSystem": "DPAS",
"sourceSystemEntityCode": "INS000080",
"statementFormat": null,
"statementIndicatorYN": "N",
"statementMailingDay": null,
"userRemarks": null,
"vendorCode": null,
"ssn": null,
"taxid": null
}
],
"paymentList": [{

"autoCommClosingDays": "3",
"autoCommExtractionYN": null,
"billingContactName": "Peter Jen",
"commissionCurrency": null,
"commissionEFTTokenId": null,
"commissionEntityYN": null,
"commissionPayeeEntityCode": null,
"commissionPayeeEntityType": null,
"commissionPaymentMethod": null,
"commissionStatementEntityCode": null,
"commissionStatementEntityType": null,
"creditTermDays": null,

},{

"autoCommClosingDays": "2",
"autoCommExtractionYN": null,
"billingContactName": "Peter Jen",
"commissionCurrency": null,
"commissionEFTTokenId": null,
"commissionEntityYN": null,
"commissionPayeeEntityCode": null,
"commissionPayeeEntityType": null,
"commissionPaymentMethod": null,
"commissionStatementEntityCode": null,
"commissionStatementEntityType": null,
"creditTermDays": null,

},{

"autoCommClosingDays": "1",
"autoCommExtractionYN": null,
"billingContactName": "Peter Jen",
"commissionCurrency": null,
"commissionEFTTokenId": null,
"commissionEntityYN": null,
"commissionPayeeEntityCode": null,
"commissionPayeeEntityType": null,
"commissionPaymentMethod": null,
"commissionStatementEntityCode": null,
"commissionStatementEntityType": null,
"creditTermDays": null,

}],
"returnpaymentList": [{

"autoCommClosingDays": "3",
"autoCommExtractionYN": null,
"billingContactName": "Peter Jen",
"commissionCurrency": null,
"commissionEFTTokenId": null,
"commissionEntityYN": null,
"commissionPayeeEntityCode": null,
"commissionPayeeEntityType": null,
"commissionPaymentMethod": null,
"commissionStatementEntityCode": null,
"commissionStatementEntityType": null,
"creditTermDays": null,

},{

"autoCommClosingDays": "2",
"autoCommExtractionYN": null,
"billingContactName": "Peter Jen",
"commissionCurrency": null,
"commissionEFTTokenId": null,
"commissionEntityYN": null,
"commissionPayeeEntityCode": null,
"commissionPayeeEntityType": null,
"commissionPaymentMethod": null,
"commissionStatementEntityCode": null,
"commissionStatementEntityType": null,
"creditTermDays": null,

},{

"autoCommClosingDays": "1",
"autoCommExtractionYN": null,
"billingContactName": "Peter Jen",
"commissionCurrency": null,
"commissionEFTTokenId": null,
"commissionEntityYN": null,
"commissionPayeeEntityCode": null,
"commissionPayeeEntityType": null,
"commissionPaymentMethod": null,
"commissionStatementEntityCode": null,
"commissionStatementEntityType": null,
"creditTermDays": null,

}],
"whatifList": [{

"autoCommClosingDays": "3",
"autoCommExtractionYN": null,
"billingContactName": "Peter Jen",
"commissionCurrency": null,
"commissionEFTTokenId": null,
"commissionEntityYN": null,
"commissionPayeeEntityCode": null,
"commissionPayeeEntityType": null,
"commissionPaymentMethod": null,
"commissionStatementEntityCode": null,
"commissionStatementEntityType": null,
"creditTermDays": null,

},{

"autoCommClosingDays": "2",
"autoCommExtractionYN": null,
"billingContactName": "Peter Jen",
"commissionCurrency": null,
"commissionEFTTokenId": null,
"commissionEntityYN": null,
"commissionPayeeEntityCode": null,
"commissionPayeeEntityType": null,
"commissionPaymentMethod": null,
"commissionStatementEntityCode": null,
"commissionStatementEntityType": null,
"creditTermDays": null,

},{

"autoCommClosingDays": "1",
"autoCommExtractionYN": null,
"billingContactName": "Peter Jen",
"commissionCurrency": null,
"commissionEFTTokenId": null,
"commissionEntityYN": null,
"commissionPayeeEntityCode": null,
"commissionPayeeEntityType": null,
"commissionPaymentMethod": null,
"commissionStatementEntityCode": null,
"commissionStatementEntityType": null,
"creditTermDays": null,

}],
"userAuthenticationList": {
"userName": "ABC",
"password": "ABC",
"ssoUserName": null,
"ssoToken": null,
"token": null,
"timestamp": null,
"iwaadomain": null,
"iwaauser": null,
"iwaasecretKey": null
},
"requestHeaderList": {
"scenarioID": "SA",
"countOfRecords": "1212",
"countOfDeposits": null,
"countOfTransactions": null,
"requestDate": null,
"sourceSystemRequestNo": null,
"totalPaymentAmount": null
}
}]

如何访问各个对象,例如实体请求 header 付款返回付款等?我必须将各个变量中的对象分开,然后使用 ng-model 和重复在屏幕上填充这些对象。

最佳答案

您可以像这样访问数据:

alert($scope.data[0].requestHeaderList.scenarioID);  // one element
$scope.reqheaderData = $scope.data[0].requestHeaderList; // Whole request part
$scope.entity = $scope.data[0].entityList; // the list of entities
// same for other parts

var myApp = angular.module('MyApp', [])
myApp.controller("myCtrl", function($scope) {

$scope.data = [{
"entityList": [
{
"scenarioNo": "SC1",
"accountingMonExtracted": null,
"acronym": null,
"address1": "542 W 27th Street 4th Floor",
"address2": null,
"addressType": "MAILING",
"alternateEmailId": null,
"alternateFaxNo": null,
"alternatePhoneNo": null,
"city": "Bethlehem",
"country": "US",
"county": null,
"firstName": "Thomas",
"fullName": "Peter Jen",
"lastName": "Routher",
"middleName": null,
"namePrefix": null,
"nameSuffix": null,
"primaryAddressYN": "Y",
"primaryEmailId": "johnmann@yahoo.com",
"primaryFaxNo": "(406)485-2983",
"primaryPhoneNo": "(405)452-3645",
"state": "AB",
"zipCode": "40007.0",
"agentType": null,
"autoCommClosingDays": null,
"autoCommExtractionYN": null,
"billingContactName": "Peter Jen",
"commissionCurrency": null,
"commissionEFTTokenId": null,
"commissionEntityYN": null,
"commissionPayeeEntityCode": null,
"commissionPayeeEntityType": null,
"commissionPaymentMethod": null,
"commissionStatementEntityCode": null,
"commissionStatementEntityType": null,
"creditTermDays": null,
"creditTermMonths": null,
"customerNo": null,
"doingBusinessAsName": null,
"eftDraftOption": null,
"entityType": "INSURED",
"frequencyDayMonth": null,
"frequencyDayOfWeek": null,
"frequencyType": null,
"invoiceCurrency": "USD",
"ncanGraceDays": null,
"outputDeliveryMethod": "M",
"parentEntityCode": null,
"paymentMethod": "EFT",
"process1099Indicator": "N",
"recurringEFTTokend": null,
"requestedDueDay": null,
"sourceSystem": "DPAS",
"sourceSystemEntityCode": "INS000020",
"statementFormat": null,
"statementIndicatorYN": "N",
"statementMailingDay": null,
"userRemarks": null,
"vendorCode": null,
"ssn": null,
"taxid": null
},
{
"scenarioNo": "SC2",
"accountingMonExtracted": null,
"acronym": null,
"address1": "542 W 27th Street 4th Floor",
"address2": null,
"addressType": "MAILING",
"alternateEmailId": null,
"alternateFaxNo": null,
"alternatePhoneNo": null,
"city": "Bethlehem",
"country": "US",
"county": null,
"firstName": "Thomas",
"fullName": "Peter Jen",
"lastName": "Routher",
"middleName": null,
"namePrefix": null,
"nameSuffix": null,
"primaryAddressYN": "Y",
"primaryEmailId": "johnmann@yahoo.com",
"primaryFaxNo": "(406)485-2983",
"primaryPhoneNo": "(405)452-3645",
"state": "AB",
"zipCode": "40007.0",
"agentType": null,
"autoCommClosingDays": null,
"autoCommExtractionYN": null,
"billingContactName": "Peter Jen",
"commissionCurrency": null,
"commissionEFTTokenId": null,
"commissionEntityYN": null,
"commissionPayeeEntityCode": null,
"commissionPayeeEntityType": null,
"commissionPaymentMethod": null,
"commissionStatementEntityCode": null,
"commissionStatementEntityType": null,
"creditTermDays": null,
"creditTermMonths": null,
"customerNo": null,
"doingBusinessAsName": null,
"eftDraftOption": null,
"entityType": "INSURED",
"frequencyDayMonth": null,
"frequencyDayOfWeek": null,
"frequencyType": null,
"invoiceCurrency": "USD",
"ncanGraceDays": null,
"outputDeliveryMethod": "M",
"parentEntityCode": null,
"paymentMethod": "EFT",
"process1099Indicator": "N",
"recurringEFTTokend": null,
"requestedDueDay": null,
"sourceSystem": "DPAS",
"sourceSystemEntityCode": "INS000040",
"statementFormat": null,
"statementIndicatorYN": "N",
"statementMailingDay": null,
"userRemarks": null,
"vendorCode": null,
"ssn": null,
"taxid": null
},
{
"scenarioNo": "SC3",
"accountingMonExtracted": null,
"acronym": null,
"address1": "542 W 27th Street 4th Floor",
"address2": null,
"addressType": "MAILING",
"alternateEmailId": null,
"alternateFaxNo": null,
"alternatePhoneNo": null,
"city": "Bethlehem",
"country": "US",
"county": null,
"firstName": "Thomas",
"fullName": "Peter Jen",
"lastName": "Routher",
"middleName": null,
"namePrefix": null,
"nameSuffix": null,
"primaryAddressYN": "Y",
"primaryEmailId": "johnmann@yahoo.com",
"primaryFaxNo": "(406)485-2983",
"primaryPhoneNo": "(405)452-3645",
"state": "AB",
"zipCode": "40007.0",
"agentType": null,
"autoCommClosingDays": null,
"autoCommExtractionYN": null,
"billingContactName": "Peter Jen",
"commissionCurrency": null,
"commissionEFTTokenId": null,
"commissionEntityYN": null,
"commissionPayeeEntityCode": null,
"commissionPayeeEntityType": null,
"commissionPaymentMethod": null,
"commissionStatementEntityCode": null,
"commissionStatementEntityType": null,
"creditTermDays": null,
"creditTermMonths": null,
"customerNo": null,
"doingBusinessAsName": null,
"eftDraftOption": null,
"entityType": "INSURED",
"frequencyDayMonth": null,
"frequencyDayOfWeek": null,
"frequencyType": null,
"invoiceCurrency": "USD",
"ncanGraceDays": null,
"outputDeliveryMethod": "M",
"parentEntityCode": null,
"paymentMethod": "EFT",
"process1099Indicator": "N",
"recurringEFTTokend": null,
"requestedDueDay": null,
"sourceSystem": "DPAS",
"sourceSystemEntityCode": "INS000060",
"statementFormat": null,
"statementIndicatorYN": "N",
"statementMailingDay": null,
"userRemarks": null,
"vendorCode": null,
"ssn": null,
"taxid": null
},
{
"scenarioNo": "SC4",
"accountingMonExtracted": null,
"acronym": null,
"address1": "542 W 27th Street 4th Floor",
"address2": null,
"addressType": "MAILING",
"alternateEmailId": null,
"alternateFaxNo": null,
"alternatePhoneNo": null,
"city": "Bethlehem",
"country": "US",
"county": null,
"firstName": "Thomas",
"fullName": "Peter Jen",
"lastName": "Routher",
"middleName": null,
"namePrefix": null,
"nameSuffix": null,
"primaryAddressYN": "Y",
"primaryEmailId": "johnmann@yahoo.com",
"primaryFaxNo": "(406)485-2983",
"primaryPhoneNo": "(405)452-3645",
"state": "AB",
"zipCode": "40007.0",
"agentType": null,
"autoCommClosingDays": null,
"autoCommExtractionYN": null,
"billingContactName": "Peter Jen",
"commissionCurrency": null,
"commissionEFTTokenId": null,
"commissionEntityYN": null,
"commissionPayeeEntityCode": null,
"commissionPayeeEntityType": null,
"commissionPaymentMethod": null,
"commissionStatementEntityCode": null,
"commissionStatementEntityType": null,
"creditTermDays": null,
"creditTermMonths": null,
"customerNo": null,
"doingBusinessAsName": null,
"eftDraftOption": null,
"entityType": "INSURED",
"frequencyDayMonth": null,
"frequencyDayOfWeek": null,
"frequencyType": null,
"invoiceCurrency": "USD",
"ncanGraceDays": null,
"outputDeliveryMethod": "M",
"parentEntityCode": null,
"paymentMethod": "EFT",
"process1099Indicator": "N",
"recurringEFTTokend": null,
"requestedDueDay": null,
"sourceSystem": "DPAS",
"sourceSystemEntityCode": "INS000080",
"statementFormat": null,
"statementIndicatorYN": "N",
"statementMailingDay": null,
"userRemarks": null,
"vendorCode": null,
"ssn": null,
"taxid": null
}
],
"paymentList": [{

"autoCommClosingDays": "3",
"autoCommExtractionYN": null,
"billingContactName": "Peter Jen",
"commissionCurrency": null,
"commissionEFTTokenId": null,
"commissionEntityYN": null,
"commissionPayeeEntityCode": null,
"commissionPayeeEntityType": null,
"commissionPaymentMethod": null,
"commissionStatementEntityCode": null,
"commissionStatementEntityType": null,
"creditTermDays": null,

},{

"autoCommClosingDays": "2",
"autoCommExtractionYN": null,
"billingContactName": "Peter Jen",
"commissionCurrency": null,
"commissionEFTTokenId": null,
"commissionEntityYN": null,
"commissionPayeeEntityCode": null,
"commissionPayeeEntityType": null,
"commissionPaymentMethod": null,
"commissionStatementEntityCode": null,
"commissionStatementEntityType": null,
"creditTermDays": null,

},{

"autoCommClosingDays": "1",
"autoCommExtractionYN": null,
"billingContactName": "Peter Jen",
"commissionCurrency": null,
"commissionEFTTokenId": null,
"commissionEntityYN": null,
"commissionPayeeEntityCode": null,
"commissionPayeeEntityType": null,
"commissionPaymentMethod": null,
"commissionStatementEntityCode": null,
"commissionStatementEntityType": null,
"creditTermDays": null,

}],
"returnpaymentList": [{

"autoCommClosingDays": "3",
"autoCommExtractionYN": null,
"billingContactName": "Peter Jen",
"commissionCurrency": null,
"commissionEFTTokenId": null,
"commissionEntityYN": null,
"commissionPayeeEntityCode": null,
"commissionPayeeEntityType": null,
"commissionPaymentMethod": null,
"commissionStatementEntityCode": null,
"commissionStatementEntityType": null,
"creditTermDays": null,

},{

"autoCommClosingDays": "2",
"autoCommExtractionYN": null,
"billingContactName": "Peter Jen",
"commissionCurrency": null,
"commissionEFTTokenId": null,
"commissionEntityYN": null,
"commissionPayeeEntityCode": null,
"commissionPayeeEntityType": null,
"commissionPaymentMethod": null,
"commissionStatementEntityCode": null,
"commissionStatementEntityType": null,
"creditTermDays": null,

},{

"autoCommClosingDays": "1",
"autoCommExtractionYN": null,
"billingContactName": "Peter Jen",
"commissionCurrency": null,
"commissionEFTTokenId": null,
"commissionEntityYN": null,
"commissionPayeeEntityCode": null,
"commissionPayeeEntityType": null,
"commissionPaymentMethod": null,
"commissionStatementEntityCode": null,
"commissionStatementEntityType": null,
"creditTermDays": null,

}],
"whatifList": [{

"autoCommClosingDays": "3",
"autoCommExtractionYN": null,
"billingContactName": "Peter Jen",
"commissionCurrency": null,
"commissionEFTTokenId": null,
"commissionEntityYN": null,
"commissionPayeeEntityCode": null,
"commissionPayeeEntityType": null,
"commissionPaymentMethod": null,
"commissionStatementEntityCode": null,
"commissionStatementEntityType": null,
"creditTermDays": null,

},{

"autoCommClosingDays": "2",
"autoCommExtractionYN": null,
"billingContactName": "Peter Jen",
"commissionCurrency": null,
"commissionEFTTokenId": null,
"commissionEntityYN": null,
"commissionPayeeEntityCode": null,
"commissionPayeeEntityType": null,
"commissionPaymentMethod": null,
"commissionStatementEntityCode": null,
"commissionStatementEntityType": null,
"creditTermDays": null,

},{

"autoCommClosingDays": "1",
"autoCommExtractionYN": null,
"billingContactName": "Peter Jen",
"commissionCurrency": null,
"commissionEFTTokenId": null,
"commissionEntityYN": null,
"commissionPayeeEntityCode": null,
"commissionPayeeEntityType": null,
"commissionPaymentMethod": null,
"commissionStatementEntityCode": null,
"commissionStatementEntityType": null,
"creditTermDays": null,

}],
"userAuthenticationList": {
"userName": "ABC",
"password": "ABC",
"ssoUserName": null,
"ssoToken": null,
"token": null,
"timestamp": null,
"iwaadomain": null,
"iwaauser": null,
"iwaasecretKey": null
},
"requestHeaderList": {
"scenarioID": "SA",
"countOfRecords": "1212",
"countOfDeposits": null,
"countOfTransactions": null,
"requestDate": null,
"sourceSystemRequestNo": null,
"totalPaymentAmount": null
}
}];
alert($scope.data[0].requestHeaderList.scenarioID);

})
<!DOCTYPE html>
<html lang="en-US">
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">

<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>

<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
</head>
<body ng-app="MyApp" ng-controller="myCtrl">

</body>
</html>

关于javascript - 如何在 $scope 中分离 get http 请求中的 json 对象?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41367615/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com