In your case you can use something like this,
$.getJSON("http://domain.com/hello.json", function(result) {
$.each(result, function(i, field) {
if (typeof field == "object") {
console.log(i);
$.each(field, function(i, f) {
console.log(f);
});
}
else {
console.log(field);
}
});
});
You can use typeof field == "object"
to check the current item is an object or not