Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- b.restaurants.
- find().
- sort({name: 1}).
- limit(10);
- { "_id" : ObjectId("59074c7c057aaffaafb0e20b"), "address" : { "building" : "10016", "coord" : [ -73.8216636, 40.5838155 ], "street" : "Rockaway Beach Boulevard", "zipcode" : "11694" }, "borough" : "Queens", "cuisine" : "Delicatessen", "grades" : [ { "date" : ISODate("2014-01-28T00:00:00Z"), "grade" : "A", "score" : 11 }, { "date" : ISODate("2013-08-20T00:00:00Z"), "grade" : "A", "score" : 9 }, { "date" : ISODate("2013-03-19T00:00:00Z"), "grade" : "A", "score" : 10 }, { "date" : ISODate("2012-03-06T00:00:00Z"), "grade" : "A", "score" : 10 }, { "date" : ISODate("2011-03-01T00:00:00Z"), "grade" : "A", "score" : 12 } ], "name" : "101 Deli", "restaurant_id" : "40591271" }
- { "_id" : ObjectId("59074c7c057aaffaafb0f8d8"), "address" : { "building" : "192", "coord" : [ -73.985501, 40.731012 ], "street" : "2 Avenue", "zipcode" : "10003" }, "borough" : "Manhattan", "cuisine" : "American", "grades" : [ { "date" : ISODate("2014-06-24T00:00:00Z"), "grade" : "A", "score" : 7 }, { "date" : ISODate("2013-10-09T00:00:00Z"), "grade" : "A", "score" : 10 }, { "date" : ISODate("2013-04-02T00:00:00Z"), "grade" : "A", "score" : 10 }, { "date" : ISODate("2012-07-03T00:00:00Z"), "grade" : "A", "score" : 5 }, { "date" : ISODate("2011-12-13T00:00:00Z"), "grade" : "A", "score" : 5 } ], "name" : "12 Street Ale House", "restaurant_id" : "41299113" }
- { "_id" : ObjectId("59074c7c057aaffaafb116cc"), "address" : { "building" : "120", "coord" : [ -74.0757603, 40.6394573 ], "street" : "Bay Street", "zipcode" : "10301" }, "borough" : "Staten Island", "cuisine" : "American", "grades" : [ { "date" : ISODate("2014-10-07T00:00:00Z"), "grade" : "A", "score" : 8 }, { "date" : ISODate("2014-04-28T00:00:00Z"), "grade" : "A", "score" : 7 }, { "date" : ISODate("2013-02-23T00:00:00Z"), "grade" : "A", "score" : 7 }, { "date" : ISODate("2012-07-16T00:00:00Z"), "grade" : "A", "score" : 7 } ], "name" : "120 Bay Cafe", "restaurant_id" : "41646201" }
- { "_id" : ObjectId("59074c7c057aaffaafb1063a"), "address" : { "building" : "3379", "coord" : [ -73.9544847, 40.8214312 ], "street" : "Broadway", "zipcode" : "10031" }, "borough" : "Manhattan", "cuisine" : "Steak", "grades" : [ { "date" : ISODate("2014-09-30T00:00:00Z"), "grade" : "A", "score" : 11 }, { "date" : ISODate("2014-04-03T00:00:00Z"), "grade" : "A", "score" : 12 }, { "date" : ISODate("2013-01-25T00:00:00Z"), "grade" : "A", "score" : 2 }, { "date" : ISODate("2012-09-11T00:00:00Z"), "grade" : "C", "score" : 0 } ], "name" : "137 Bar & Grill", "restaurant_id" : "41478576" }
- { "_id" : ObjectId("59074c7c057aaffaafb0f22e"), "address" : { "building" : "169", "coord" : [ -73.9897597, 40.7139068 ], "street" : "East Broadway", "zipcode" : "10002" }, "borough" : "Manhattan", "cuisine" : "American", "grades" : [ { "date" : ISODate("2014-11-24T00:00:00Z"), "grade" : "B", "score" : 22 }, { "date" : ISODate("2014-05-06T00:00:00Z"), "grade" : "B", "score" : 21 }, { "date" : ISODate("2013-07-30T00:00:00Z"), "grade" : "C", "score" : 45 }, { "date" : ISODate("2012-07-05T00:00:00Z"), "grade" : "A", "score" : 4 }, { "date" : ISODate("2012-02-09T00:00:00Z"), "grade" : "A", "score" : 10 } ], "name" : "169 Bar", "restaurant_id" : "41171181" }
- { "_id" : ObjectId("59074c7c057aaffaafb10338"), "address" : { "building" : "1818", "coord" : [ -73.952862, 40.598966 ], "street" : "Avenue U", "zipcode" : "11229" }, "borough" : "Brooklyn", "cuisine" : "Chinese", "grades" : [ { "date" : ISODate("2014-10-23T00:00:00Z"), "grade" : "A", "score" : 13 }, { "date" : ISODate("2014-04-29T00:00:00Z"), "grade" : "A", "score" : 12 }, { "date" : ISODate("2013-08-28T00:00:00Z"), "grade" : "A", "score" : 11 }, { "date" : ISODate("2013-03-13T00:00:00Z"), "grade" : "B", "score" : 20 }, { "date" : ISODate("2012-06-25T00:00:00Z"), "grade" : "A", "score" : 11 }, { "date" : ISODate("2012-01-12T00:00:00Z"), "grade" : "B", "score" : 23 } ], "name" : "1818 Seafood Restaurant", "restaurant_id" : "41445737" }
- { "_id" : ObjectId("59074c7c057aaffaafb119fb"), "address" : { "building" : "75", "coord" : [ -74.0764379, 40.6453515 ], "street" : "Richmond Terrace", "zipcode" : "10301" }, "borough" : "Staten Island", "cuisine" : "American", "grades" : [ { "date" : ISODate("2014-06-21T00:00:00Z"), "grade" : "A", "score" : 4 }, { "date" : ISODate("2013-08-21T00:00:00Z"), "grade" : "A", "score" : 12 }, { "date" : ISODate("2012-06-20T00:00:00Z"), "grade" : "A", "score" : 10 } ], "name" : "1St Base Concession Stand", "restaurant_id" : "41673023" }
- { "_id" : ObjectId("59074c7c057aaffaafb106a2"), "address" : { "building" : "601", "coord" : [ -92.72874859999999, 41.746174 ], "street" : "6 Avenue", "zipcode" : "10011" }, "borough" : "Manhattan", "cuisine" : "Pizza", "grades" : [ { "date" : ISODate("2014-04-14T00:00:00Z"), "grade" : "A", "score" : 10 }, { "date" : ISODate("2013-11-16T00:00:00Z"), "grade" : "A", "score" : 12 }, { "date" : ISODate("2013-07-17T00:00:00Z"), "grade" : "B", "score" : 17 }, { "date" : ISODate("2013-01-24T00:00:00Z"), "grade" : "B", "score" : 23 }, { "date" : ISODate("2012-07-13T00:00:00Z"), "grade" : "A", "score" : 10 }, { "date" : ISODate("2012-02-06T00:00:00Z"), "grade" : "A", "score" : 10 }, { "date" : ISODate("2011-10-26T00:00:00Z"), "grade" : "B", "score" : 26 }, { "date" : ISODate("2011-05-11T00:00:00Z"), "grade" : "A", "score" : 12 } ], "name" : "2 Bros Pizza", "restaurant_id" : "41482609" }
- { "_id" : ObjectId("59074c7c057aaffaafb10c04"), "address" : { "building" : "211", "coord" : [ -73.986215, 40.7330791 ], "street" : "East 14 Street", "zipcode" : "10003" }, "borough" : "Manhattan", "cuisine" : "Tex-Mex", "grades" : [ { "date" : ISODate("2014-09-19T00:00:00Z"), "grade" : "A", "score" : 5 }, { "date" : ISODate("2014-03-17T00:00:00Z"), "grade" : "A", "score" : 10 }, { "date" : ISODate("2013-08-14T00:00:00Z"), "grade" : "A", "score" : 11 }, { "date" : ISODate("2012-07-23T00:00:00Z"), "grade" : "A", "score" : 8 }, { "date" : ISODate("2012-02-13T00:00:00Z"), "grade" : "A", "score" : 4 } ], "name" : "211 New Taco Grill", "restaurant_id" : "41554626" }
- { "_id" : ObjectId("59074c7c057aaffaafb10acb"), "address" : { "building" : "168", "coord" : [ -73.9798836, 40.7272748 ], "street" : "Avenue B", "zipcode" : "10009" }, "borough" : "Manhattan", "cuisine" : "French", "grades" : [ { "date" : ISODate("2014-07-01T00:00:00Z"), "grade" : "A", "score" : 12 }, { "date" : ISODate("2013-11-12T00:00:00Z"), "grade" : "A", "score" : 11 }, { "date" : ISODate("2013-04-10T00:00:00Z"), "grade" : "A", "score" : 11 }, { "date" : ISODate("2012-02-02T00:00:00Z"), "grade" : "A", "score" : 11 } ], "name" : "26 Seats", "restaurant_id" : "41541665" }
- db.restaurants.
- find().
- db.restaurants.
- find({id:
- db.restaurants.
- find({_id: "59074c7c057aaffaafb0e20b"});
- db.restaurants.
- find({borough: "Queens"});
- db.restaurants.find({borough: "Queens"});
- Marjorie Paddock@DESKTOP-22GC7KO MINGW64 ~/Documents/Thinkful/Projects/primer-dataset.json (1)
- $ mongo
- MongoDB shell version v3.4.10-77-g31f8c35
- connecting to: mongodb://127.0.0.1:27017
- MongoDB server version: 3.4.10-77-g31f8c35
- show dbs
- Marjorie Paddock@DESKTOP-22GC7KO MINGW64 ~/Documents/Thinkful/Projects/primer-dataset.json (1)
- $ mongo
- MongoDB shell version v3.4.10-77-g31f8c35
- connecting to: mongodb://127.0.0.1:27017
- MongoDB server version: 3.4.10-77-g31f8c35
- show dbs
- admin 0.000GB
- local 0.000GB
- tempTestDb 0.001GB
- clear
- 2018-01-30T12:17:38.151-0500 E QUERY [thread1] ReferenceError: clear is not defined :
- @(shell):1:1
- db
- test
- use tempTestDb
- switched to db tempTestDb
- db
- tempTestDb
- db.restaurants.find({borough: "Queens"});
Add Comment
Please, Sign In to add comment