I die json Daten wie unten haben [{ "id": 1, "address": "MG Road", "country": INDIA, "state": AP, "city": VIJ }, { "id": 2, "address": "Miyapur", "country": INDIA, "state": TS, "city": HYD }, { "id": 3, "address": "Autonagar", "country": INDIA, "state": AP, "city": VIJ }, { "id": 4, "address": "Kukatpalli", "country": INDIA, "state": TS, "city": HYD }, { "id": 5, "address": "Koti", "country": INDIA, "state": TS, "city": HYD } ]
GroupBy mit mehreren Attributen in Winkelfilter
I wie unten Format angezeigt werden soll
IND, TS, HYD
Miyapur, Koti, Kukatpalli
IND, AP, VIJ,
MG Road, Autonagar
Zu diesen im wie unter Verwendung von groupBy filtern, aber ich war mein Code nicht in der Lage dieser Werte
hier zu Gruppe
<div class="location-container">
<label ng-repeat="(key,value) in locationmodel | groupBy: '[country,state,city]'">{{key}}
</label>
<span ng-repeat="location in value">{{location.address}}</span>
</div>
aber mit obigem Code war ich unfähig zu bekommen, was ich erwartet habe. Bitte helfen Sie mir bei der Lösung dieses Problems.
Vielen Dank im Voraus
Arbeiten perfekt :) Vielen Dank – user2451830