jquery 判断数组是否为空

查看一下数组的长度即可。

if (data.length === 0) {
  console.log("数组为空");
}