使用length属性
var str = eval('[{"id":1,"sex":"","age":2,"userName":"1","job":"","password":""},{"id":2,"sex":"","age":2,"userName":"1","job":"","password":""}]');$.each(str, function() {alert(this.id);});自行参考。
数组.length==0就是空