如何查询动态mongo字段?

时间:2019-03-18 07:39:37

标签: mongodb python-2.7

如何查询键“ group1”?以下记录的主键是动态的。

{ "_id" : ObjectId("5c8b99492e5c1e16ace0c024"), "12345erty" : { "group1" : [ {"data":"dataarray"},{"data":"dataarray"},{"data":"dataarray"} ] } }
{ "_id" : ObjectId("5c8ba10d2e5c1e32408ac2ab"), "mjhgfd7654" : { "group1" : [ {"data":"dataarray"},{"data":"dataarray"},{"data":"dataarray"} ] } }
{ "_id" : ObjectId("5c8ba1b42e5c1e32b39319d8"), "qwert7654" : { "group2" : [ {"data":"dataarray"},{"data":"dataarray"},{"data":"dataarray"} ] } }

0 个答案:

没有答案