How to Run database commands in MongoDB
After made a connection to the database as using command mongo.
Now you will run mongo command in terminal . Use show dbs to view databases in mongo.
you can use command use db to create or switch to the database already / to create new .
use shop // default database with metadata
INSERT DATA IN COLLECTION
You will get the acknowledgment after insertion of data with the inserted id as below for that record.
YOu will get the result using below command find()
use in a readable format you can format it using pretty()
insert as data in whichever format you want as it is schema-less
now view all your data using find command