Ich brauche Ihr Fachwissen zu diesem Thema.So stellen Sie die Summe für http.get-Anforderungsdaten her
Ich erhalte Daten durch http.get Anforderung und die JSON-Daten ist wie folgt:
{"displayTransactionDateTime": "Tue, 19th Sep 2017"
, "transactionDateAndTime": "2017-09-19 18:36:34.0"
, "transactionId": "158131"
, "refTransactionId": null
, "transactionType": "Credit Transfer"
, "creditType": "Transfer"
, "transactionMode": "SYSTEM CREDITS"
, "transactionCurrency": "SYSTEM CREDITS"
, "transactionAmount": "50"
, "credits": "50"
, "creditMessage": ""},
{"displayTransactionDateTime": "Wed, 13th Sep 2017"
, "transactionDateAndTime": "2017-09-13 09:53:28.0"
, "transactionId": "157687"
, "refTransactionId": null
, "transactionType": "Credit Purchase"
, "creditType": "Bought"
, "transactionMode": "CREDIT CARD"
, "transactionCurrency": "AED"
, "transactionAmount": "50"
, "credits": "10"
, "creditMessage": null},
{"displayTransactionDateTime": "Sat, 9th Sep 2017"
, "transactionDateAndTime": "2017-09-09 14:49:42.0"
, "transactionId": "157378"
, "refTransactionId": null
, "transactionType": "Voucher Purchase"
, "creditType": "Spent"
, "transactionMode": "SYSTEM CREDITS"
, "transactionCurrency": "SYSTEM CREDITS"
, "transactionAmount": "5"
, "credits": "5"
, "creditMessage": null}
{
"displayTransactionDateTime": "Tue, 7th Feb 2017"
, "transactionDateAndTime": "2017-02-07 19:11:40.0"
, "transactionId": "34133"
, "refTransactionId": "34132"
, "transactionType": "Credit Award"
, "creditType": "Award"
, "transactionMode": "SYSTEM CREDITS"
, "transactionCurrency": "SYSTEM CREDITS"
, "transactionAmount": "1"
, "credits": "1"
, "creditMessage": "Referral Credit Award"}
{"displayTransactionDateTime": "Sat, 20th Aug 2016"
, "transactionDateAndTime": "2016-08-20 17:50:42.0"
, "transactionId": "10348"
, "refTransactionId": "10347"
, "transactionType": "Credit Received"
, "creditType": "Recieved"
, "transactionMode": "SYSTEM CREDITS"
, "transactionCurrency": "SYSTEM CREDITS"
, "transactionAmount": "1"
, "credits": "1"
, "creditMessage": ""}
Insgesamt Ich habe 100 mit diesen 5 creditTypes gemischt Aufzeichnungen.
"creditType": "Transfer", "creditType": "Bought", "creditType": "Spent",
"creditType": "Award", "creditType": "Received".
und es gibt auch Credits für jeden creditType.
Um den Fehler zu sehen, zeige ich die Daten durch ng-Wiederholung, aber es funktioniert perfekt.
Jeder kann mir helfen, wie bekomme ich die Summe für jeden creditType?
Für Ex: creditType: Transfer =, creditType: Gekauft =, creditType: Verbrauchte =, creditType: Auszeichnung =, creditType:? Received =,
Vielen Dank im Voraus !!!
Möchten Sie die Summe der "Credits" basierend auf Kredittyp? –
Ja Herr Surjeet Bhadauriya. kannst du mir bitte dabei helfen ?? –