I have this code trying to extract the first (or both) "ZoneId" values from the below JSON string:
var obj = jQuery.parseJSON('{"SecureZoneSubscriptionList": {"EntityId": 8628428,"Subscriptions": [{"ZoneName": "Customer Secure Zone","ZoneId": "51",},{"ZoneName": "Wholesaler Secure Zone","ZoneId": "3573",},]}}');
alert(obj.SecureZoneSubscriptionList[0].ZoneId);
I have looked at other similar versions of code that do exactly this and work, but when I apply it to my situation is fails to work? Would love to know what I'm doing wrong (this is the first time I've worked with JSON and also still a novice with jQuery)... would appreciate any help. Thanks.
obj is null?