Skip to main content


In order to successfully complete this lesson, you'll need a basic understanding of collections and predicates.

In this section, we'll learn how to transact data. Transacting is adding, updating, and deleting data. The first thing we'll look at is how transactions are structured.

Transaction Format#

Every transaction that you issue needs to be inside of square brackets, [ and ], and every subject that you are creating or updating needs to be inside of curly brackets {, and }.

Each of those objects inside of curly brackets will have multiple key-value pairs. The order of those key-value pairs does not matter, but each object needs to have an _id key.

For example, this is a valid transaction:

[  {    "_id": "person",    "fullName": "Amelia Earhart"  }]