我是个彻头彻尾的蒙哥新手.我正在使用mac的mongo hub.我需要查询以下json-
{ "_id" : ObjectId( "abcd" ),
"className" : "com.myUser",
"reg" : 12345,
"test" : [
{ "className" : "com.abc",
"testid" : "pqrs" } ] }
找到testid是pqrs的记录.我该怎么做呢?
我是个彻头彻尾的蒙哥新手.我正在使用mac的mongo hub.我需要查询以下json-
{ "_id" : ObjectId( "abcd" ),
"className" : "com.myUser",
"reg" : 12345,
"test" : [
{ "className" : "com.abc",
"testid" : "pqrs" } ] }
找到testid是pqrs的记录.我该怎么做呢?
您可以在Mongo Hub的查询字段中键入{'test.testid': 'pqrs'}
.