The following steps show you how to display the JSON data:
- Start the Mongo shell with the following command.
>mongo
- To use the wls database run the following Mongo shell command.
>use wls
- To list the collections run the following Mongo shell command.
>show collections
- To output the document count run the following Mongo shell command. >db.wlslog.count()
The output from the preceding commands is shown in Figure 8-4.
- To list the documents imported to MongoDB Server run the following Mongo shell command.
>db.wlslog.find()
The documents imported to MongoDB Server get listed as shown in Figure 8-5.
Source: Vohra Deepak (2015), Pro MongoDB™ Development, Apress; 1st ed. edition.