在具有节点宁静的多列上查找
我在这里有几个问题。 我正在尝试节点宁静 。 我有一个集合,如下所示
{ "_id": "59de06427f04284a1601e8bd", "name": "Thabung", "region": "59de03667f04284a1601e58f", "__v": 1, "branches": [ { "name": "XYZ", "_id": "59de070a7f04284a1601e8be", "address": { "street": "FairyStreet", "country": "ABC", "city": "BLL", "zip": "123456" }, "customerCodes": [ "ccd", "xyz" ] } ] }
现在,如果我传递了像apiendpoint/?branches.name=XYZ
这样的查询, apiendpoint/?branches.name=XYZ
可以工作。 但是,如果我尝试apiendpoint/?branches.customerCodes=ccd
它不匹配。 请注意branches.customerCodes
是一个数组
另外我想匹配多个领域的东西
apiendpoint/?fieldone=XYZ&fieldtwo=abc
,我应该如何进行?