Skip to content

Instantly share code, notes, and snippets.

@dalmat36
Created April 3, 2015 16:29
Show Gist options
  • Select an option

  • Save dalmat36/4b516c54dee18f2b5892 to your computer and use it in GitHub Desktop.

Select an option

Save dalmat36/4b516c54dee18f2b5892 to your computer and use it in GitHub Desktop.
This code snippet inserts three people documents into the MongoDB "people" collection and prints out all people in the collection.
collection.insertOne(person1);
collection.insertOne(person2);
collection.insertOne(person3);
System.out.println("Result After Insert\n");
printAllPeople();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment