I think the problem is you have the "department" 3 times in the same hash object,so the last one overrides everything. you should change "departments" to an array and loop through it
> > > > > { "departments": { > > "department": {"ID": 1, "Name": "Physics"}, > > "department": {"ID": 2, "Name": "Chemistry"}, > > "department": {"ID": 3, "Name": "Biology"} > > }} > > > > i tried > > > > $.each(json.departments.department, function(i, n) { > > alert(i + " " + n); > > }); > > >