Sorting mongodb client findOne() in node
问题 I am building a server-less app in AWS with Lambda and Node.js. I currently have a MongoDB out at mLab. I am attempting to get the "latest" record based on an ISODate string. Using either findOne() or find w/limit 1 it returns the same record everytime (not the latest one). I have 2 records in my test table that look like: { "field1": "myField", "versionTimestamp": "2017-06-13T18:33:06.223Z" } { "field1": "myField", "versionTimestamp": "2017-12-13T18:33:06.223Z" } No matter what I do it