MongoDB not okForStorage error

I've looked around quite a bit concerning this error, it seems that Mongo won't accept a . or a $ in an update, yet I still get this error

{ [MongoError: not okForStorage]
  name: 'MongoError',
  err: 'not okForStorage',
  code: 12527,
  n: 0,
  connectionId: 18,
  ok: 1 }

This is the object I'm updating:

{
status: "open",
type: "item",
parentId: "4fa13ba2d327ca052d000003",
_id: "4fa13bd6d327ca052d000012",
properties: {
  titleInfo: [
   { title: "some item" }
  ]
  }
}

And I'm updating it to:

{
fedoraId: 'aFedoraLib:438',
status: "closed",
type: "item",
parentId: "4fa13ba2d327ca052d000003",
_id: "4fa13bd6d327ca052d000012",
properties: {
  titleInfo: [
   { title: "some item" }
  ]
  }
}

Another possible cause I just ran into: storing an object which has periods in the string keys.

So for people getting the same error: It's due to the fact that I was including the _id, which Mongo doesn't like apparently

I ran into this error when trying to save a JSON structure with this key-value pair (coming straight out of an AngularJS app):

 "$$hashKey":"021"

Removing just that key fixed the problem. For others using Angular, it looks like calling Angular's built-in angular.toJson client-side eliminates the $$hashkey keys. From their forums:

$scope.ngObjFixHack = function(ngObj) {
    var output;

    output = angular.toJson(ngObj);
    output = angular.fromJson(output);

    return output;
}