0

各位大神,

我有个查询请求。数据是这样的
document = {
“v1”: {
“vv1”: {“type”: “type1”},
“vv2”: {“no_type”: null}
}
}
也就是v1的value是一个字典,字典的key不确定,可能是vv1,vv2之类的,但是document更新后会加入type,所以我想查出包含type的ducument。比如查询提交是{“v1.$.type”: {$exists: true}},但是这个是给array用的,所以请大神指点下我的查询条件怎么设?