jquery方法
var data = {};
var b = $.isEmptyObject(data);
alert(b);//true
将json对象转化为json字符串,再判断该字符串是否为"{}"
var data = {};
var b = (JSON.stringify(data) === "{}");
alert(b);//true
删除json对象中的key
for(var key in student){
delete student[key];
}
console.log(student);