To get this done, inside of Atom, we're going to make a change to how we call find. Instead of passing in 0 arguments, we're going to pass in 1. This is what's known as our query. We can start specifying how we want to query the Todos collection. For example, maybe we want to query only Todos that have a completed value equal to false. All we have to do to query by value is set up the key-value pairs, as shown here:
db.collection('Todos').find({completed: false}).toArray().then((docs) => {
If I rerun our script over in the Terminal after shutting it down, we get just our one Todo item:
We have our item ...