I have a json object which has a zip entries. In the below json object there is zip entries under "Zipcode" key, basically I want to group it by Zip code to show which zip code belongs to what all zone Ids.
for example - zipcode 7 belongs to zoneIds 12005,12008,12006,12009 and zipcode 12 belongs to zoneIds 12004,11001. ultimate goal is to show this in some error message.
var Json = [{
City: "ABC",
ZipCode: "7",
ZoneID: 12008,
ZoneName: "test_TP41"},
{City: "ABC",
ZipCode: "7",
ZoneID: 12005,
ZoneName: "test_TP4"
},
{City: "ABC",
ZipCode: "7",
ZoneID: 12007,
ZoneName: "test_TP456"},
{City: "ABC",
ZipCode: "7",
ZoneID: 12006,
ZoneName: "test_TP5"},
{City: "ABC",
ZipCode: "7",
ZoneID: 12009,
ZoneName: "testgrp16"},
{City: "CDE",
ZipCode: "12",
ZoneID: 12004,
ZoneName: "test_TP2"},
{City: "CDE",
ZipCode: "12",
ZoneID: 11001,
ZoneName: "test 20201"
}]