how can i loop through json like:
{ "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);
});
and
i am new to jquery and what i intend to do now is to load json from
server and then based on the json, remove all options from a drop down
and populate it with new items from the json. something like a
cascading drop down.
i dunno if the json outputted is correct? do i need something like
"depart
2 matches
Mail list logo