SHARE
TWEET

Untitled

a guest Aug 13th, 2018 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //First get the list of all documents.
  2.         db.restaurants.find({});
  3.         //Create a variable and assign to a single document id.
  4.         var documentId = ObjectId("59074c7c057aaffaafb0da57");
  5.         //Get the contents of the single document
  6.         db.restaurants.findOne({_id: documentId});
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top