I have a collection that I filled out from CSV, but there are several fields that I no longer need in the record, so I want to delete them, but it seems to do nothing, This is from the CLI:
> db.stops.update({}, { $unset: {stop_lat: 1, stop_lon: 1} }, { multi: 1 }) > db.stops.findOne({stop_id: 1000}) { "_id" : ObjectId("50d30386884be8bf2a6c208a"), "stop_id" : 1000, // some other fields "stop_lat" : -27.339115, "stop_lon" : 153.043884, }
What am I doing wrong here?
nickf source share