how to change values returned by JSON hash
All of the following works fine - except when I put in the switch() to adjust a value returned
$.getJSON( urlCalled, parametersUsed, function(dataReturned)
{
pj= dataReturned;
var a = pj;
jQuery.each(a, function(n) {
var v = switch(a[n].value1) {case 'YES':'Active' break case 'NO':'Inactive' break}) + ' ' + a[n].value2;
alert(v);
});
Help with syntax or do I need a nested each() would be very helpful - thank you