.sort() , in pymongo, takes key and direction as parameters. So if you want to sort by, let's say, id then you should .sort("_id", 1). For multiple fields:
確定! 回上一頁