{
"ret": [],
"retUnderAgt": [],
"sum": {
  "services": [
    {
      "serviceCode": "BET",
      "serviceName": "Bet Games Lottery ",
      "txnTypes": [
        {
          "txnTypeName": "Sale",
          "amount": "0",
          "txnTypeCode": "SALE",
          "amt": "0.0"
        },
        {
          "txnTypeName": "Winning",
          "amount": "0",
          "txnTypeCode": "WIN_CLAIM",
          "amt": "0.0"
        }
      ]
    }]
}
}
I am trying to loop over sum like this ----------->>>
for(let i in activityDetailedReportData.sum){
  this.finalTotal.push("Total");
  
  for(let j of i.services){
    for(let k of j.txnTypes){
      this.finalTotal.push(k.amount)
    }
  } 
}
I am trying to add all amounts in all txnTypes into one array called finalTotal.
I don't know how to loop over txnTypes inside services. Tell me how should I do it?
I've edited the question as needed Please help me out in this
 
    