Group/sum property values inside an array of objects(json) using Angular 4 Pipes or Rxjs operators
问题 The response from my http call is an array of company objects like this: response = [{ "name": "CompanyName1", "registrations": [ { "country": "en", "register": "registerType1", "amount": 2 }, { "country": "wa", "register": "registerType2", "amount": 1 },{ "country": "en", "register": "registerType1", "amount": 3 }, { "country": "sc", "register": "registerType3", "amount": 2 }, { "country": "wa", "register": "registerType3", "amount": 2 } ] }, { "name": "CompanyName2", "registrations": [ {