我想验证json[]列the_array是否为空。对于一个正常的数组,我可以检查:ERROR: could not identify an equality operator for type jsonarray_length(the_array= null // yes, array_length on an
我正在使用这段代码,并且只想在MongoDB数据库中存在该用户时发送一条错误消息。问题是,当我尝试发布一个使用失眠的新用户时,它仍然告诉我它是存在的:当我登录existingUser时,它等于[],这等同于真吗?当我调用find the方法但没有记录时,它应该返回一个空数组吗?all fields');
return res.status(400).json({ msg: 'please enter all fields
如果我定义一个整数数组: int[] a = new int[13]; 并且我没有向其中插入任何项,我如何知道数组a是否包含任何项或完全为空?我必须遍历所有的a.Length索引吗?在列表中 List<int> b = new List<int>(); 如果我检查: if(b.Count == 0) // The list does not contain any items.