$.ajax({ url : "positionFinds.action", dataType : "json", data : "depar.id="+deptId, type : "post", success : function(data, status) { //后台返回positions的List集合 if(data!=null && data.positions!=null && data.positions.length>0){ for(var i in data.positions){ var position=data.positions[i]; var id = position.id; } } } } });