Migrating Oracle Database: Displaying the JSON Data in MongoDB

The following steps show you how to display the JSON data:

  1. Start the Mongo shell with the following command.

>mongo

  1. To use the wls database run the following Mongo shell command.

>use wls

  1. To list the collections run the following Mongo shell command.

>show collections

  1. 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.

  1. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *