检查数组MongoDB中的值

时间:2016-03-04 16:51:59

标签: javascript jquery mongodb meteor

我需要检查MongoDB中的值是否不在数组中。这应该与另外两个与$and相关的检查一起发生。 这是我的代码:

Meteor.users.findOne({$and:[{"profile.assigned":"somevalue"},
                             {_id: {$ne: someoneId} },
                 {"the array": {the value which should not be in the array} }
                                    ]});

执行该查询的语法是正确的。我在这里注意到一些问题,但是找不到与我的问题有关的东西。我应该查询一个特定的数组,该数组是用户的属性并包含其他一些id。

0 个答案:

没有答案
相关问题