ho capito il problema: non serve fare il parsing ma solamente scorrere l'array restituito da JSON:

Codice PHP:
$.each(msg, function(indexvalue) {
   
alert(index+': '+value);
}); 
ottenendo così le coppie indice, valore.