これはコレクション coll_users のフィールドです
_id // ObjectID
username // type string
password // type string
friend_id // array number ( ids of friends)
user_id // Number (my id)
わかりました、friend_id に存在する coll_users からすべてのユーザー名を選択したいということですか?
デシベル.coll_users.find()
{ "_id" : ObjectId("51aaba74e747509139beed9b"), "friend_id" : [ 2, 3, 55, 56 ], "password" : "something", "user_id" : 1, "username" : "something" }
私がやりたいのは、コレクションのfriend_idにuser_idが存在するすべてのユーザーを選択することです
よろしく