skip to Main Content

How to return raw JSON directly from a mongodb query?

In MongoDB (using mongosh or command-line mongo cli), you can query documents, for example using db.mycollection.find({"something":true}) and get the following result: { "someDate": ISODate("2022-10-24T17:21:44.980Z"), "something": true, "hello": "world" } This result, however, is not valid JSON (Due to ISODate). How…

VIEW QUESTION
Back To Top
Search