Mongo Query on Subfields

后端 未结 3 1413
情书的邮戳
情书的邮戳 2021-01-06 15:59

I have a document -

  {\"_id\" : ObjectId(\"51385d2308d427ce306f0100\"),
  \"aid\" : \"1\",
  \"studyId\" : \"study-1\",
  \"mediaType\" : \"mic         


        
3条回答
  •  执念已碎
    2021-01-06 16:30

    u could search via db.foo.find({ 'status.algo1' : 'required' }) or db.foo.find({ 'status.algo2' : 'required' }), but it's probably not possible to filter by regex keys, see also this post: https://stackoverflow.com/a/7290728/654952

提交回复
热议问题