Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mongodb Meteor轻松搜索用户集合中的嵌套字段_Mongodb_Meteor_Selector - Fatal编程技术网

Mongodb Meteor轻松搜索用户集合中的嵌套字段

Mongodb Meteor轻松搜索用户集合中的嵌套字段,mongodb,meteor,selector,Mongodb,Meteor,Selector,我在users集合中有嵌套属性,例如:“users.cast.eyes” 如何使用easy search selector方面搜索这些内容 /*This is not working, because "eyes" is a nested property*/ if (options.search.props.eyes) { selector.eyes = options.search.props.eyes; } /*This is not working, I'm getting a n

我在users集合中有嵌套属性,例如:“users.cast.eyes”

如何使用easy search selector方面搜索这些内容

/*This is not working, because "eyes" is a nested property*/
if (options.search.props.eyes) {
  selector.eyes = options.search.props.eyes;
}

/*This is not working, I'm getting a not such property error*/
if (options.search.props.eyes) {
  selector.cast.eyes = options.search.props.eyes;
}

非常感谢您的帮助,谢谢您自己已经回答了。使用基于字符串的属性查询嵌套对象:

selector['cast.eyes']=。。。

你自己已经回答了。使用基于字符串的属性查询嵌套对象:

selector['cast.eyes']=。。。

使用MongoDB,您可以使用点符号查询文档的嵌套文件,使用MongoDB查看,您可以使用点符号查询文档的嵌套文件,查看