相关疑难解决方法(0)

与多个字段不同,以及mongodb中的where条件

我想查询相当于写入distinctwheremongodb.sql查询是 select DISTINCT key,score from GPC where note="test2" and notetwo = "meet2"

{ "_id" : ObjectId("4dc86fef6a0aa8513ab5f21c"), "key" : "SAGAR","score" : 16, "note" : "test1", "notetwo" : "meet1" } 
{ "_id" : ObjectId("4dc86ffd6a0aa8513ab5f21d"), "key" : "SAGAR456", "score" : 17, "note" : "testjh1", "notetwo" : "meetjh1" } 
{ "_id" : ObjectId("4dc8700b6a0aa8513ab5f21e"), "key" : "SAGAR33", "score" : 37, "note" : "test2", "notetwo" : "meet2" } 
{ "_id" : ObjectId("4dc871686a0aa8513ab5f21f"), "key" : "SAGAR33", "score" : 37, "note" : …
Run Code Online (Sandbox Code Playgroud)

mongoose mongodb node.js

9
推荐指数
1
解决办法
6743
查看次数

标签 统计

mongodb ×1

mongoose ×1

node.js ×1