M001-Chapter 4-Lab 1: Logic Operators

I have run the given command mentioned in the problem. But it is throwing an error mentioning WriteError: Cannot apply $inc to a value of non-numeric type.

I see one of two things:

  1. You are using the wrong database.


  1. You modified the type of the pop field for matching documents.

To verify if 1. run the commands:

show collections

To verify if 2. run the command:

db.zips.find( {} , { “pop” : 1 } )