if you had:
var json = {"4":{"6":"1"},"3":{"1":"1","2":"1"}}
and this div:
<div id="Results"></div>
then this code:
$.each(json, function(Parent, Values) {
$("#Results").append("Parent: " + Parent + "</br />");
$.each(values, function(key, val) {
$("#Results").append("-- Key: " + key + ", Value: " +
val + "</br />");
});
});
Would result in
Parent: 4
-- Key: 6, Value 1
Parent 3
-- Key: 1, Value 1
-- Key: 2, Value 1