Running mongod
3.6 and attempting to use this example.
Here is the sample data:
> db.students2.find().pretty()
{
\"_id\" : 1,
When switching from lower version to higher version for mongodb you have to set setFeatureCompatibilityVersion for your mongodb which
Enables or disables the features that persist data incompatible with earlier versions of MongoDB. You can only issue the setFeatureCompatibilityVersion against the admin database.
You can simply set this by running this command in mongo shell
db.adminCommand( { setFeatureCompatibilityVersion: "3.6" } )