Common MONGOSH Commands to Manipulate DB

### LOGIN the MongoDB 
$ mongosh mongodb+srv://<USERNAME>:<PASSWORD>@cluster0.w3asdnmo.mongodb.net/

### ASSIGN DATA to an JSON ARRAY
$ data = [{}, {}]

### INSERT one Object into Collection
$ db.stores.insert({name: 'Phở Bò Đại Yên', coordinate: '21.03528506150826, 105.82013541089587', visits: 2, likes: 2, dislikes: 0, video_url: 'mp4/pho_bo_dai_yen.mp4'})

### INSERT data into a Collection
$ db.stores.insertMany(data)

### SHOW ALL data in a Collection
$ db.stores.find().pretty()

### SHOW data matching query 
$ db.stores.findOne({coordinate: '21.020066445116232, 105.80916422741088'})

### Update an object inside the Collection
$ db.stores.update({ coordinate: '21.020066445116232, 105.80916422741088' }, { $set: { name: "Xôi Thịt Kho Tàu" } })}

### Remove Fields
db.stores.updateMany({}, {$unset: {like: "", dislike:"", visit:""}})

### SORT by Likes
$ db.stores.find().sort({dislikes: 1, likes: -1}).pretty()

### ADD new Item to Array
$ db.stores.update({store_url: 'xoi_nguyet_90_dao_tan_ba_dinh_ha_noi'}, {$push: {items: {name: "Xôi Xéo", price: 20000, image_url: "images/xoi_nguyet/xoi_xeo.svg" }}})

### Update ITEM within ARRAY Field
db.stores.update({name: 'Xôi Nguyệt'}, {$set: {'items.0':{name: 'Xôi Lạc', price: 25000, image_url: 'images/xoi_nguyet/xoi_lac.svg'}}})

Open Positions
Lets have a brainstorming
session about your business
How about a 15 mins Conference Call
Submit
More About Dystill Vision around the Internet.