当我console.log
data
从 ajax 调用中得到这个日志时:
Object {next_id: null, images: Array[0]}
images: Array[0]
next_id: null
__proto__: Object
所以我的对象不是0
空的。我想编写一个 if 语句,当data
(作为对象)返回images
具有 0 数组的属性时运行。
就像是:
if (data:images === [0])
其中data
是 jQuery 对象和images
该对象的属性。