title: key $date must not start with '$' When trying to insert into a MongoDB collection
body: <p>So I have my data base called &quot;noticias&quot; and a collection called &quot;noticias2&quot;</p>
  <p>Heres the validation schema:</p>
  <pre><code>db.createCollection(&quot;noticias2&quot;, {
     validator: {
        $jsonSchema: {
           bsonType: &quot;object&quot;,
           required: [ &quot;newsID&quot;, &quot;nombre&quot;, &quot;autor&quot;, &quot;fecha&quot;, &quot;cuerpo&quot;, &quot;comentarios&quot;],
           properties: {
              newsID: {
                 bsonType: &quot;int&quot;,
                 description: &quot;Numero Unico para cada Noticia&quot;
              },
              nombre: {
                 bsonType: &quot;string&quot;,
                 description: &quot;Nombre de la noticia&quot;
              },
              autor: {
                 bsonType: &quot;string&quot;,
                 description: &quot;Nombre del autor de la noticia&quot;
              },
              fecha: {
                 bsonType: &quot;date&quot;,
                 description: &quot;Nombre de usuario del autor&quot;
              },
              cuerpo: {
                 bsonType: &quot;string&quot;,
                 description: &quot;Cuerpo de la noticia&quot;
              },
              comentarios: {
                  bsonType: [&quot;array&quot;],
                  minItems: 0, // each box of food color must have at least one color
                  uniqueItems: false,
                  items: {
                      bsonType: [&quot;object&quot;],
                      required: [&quot;autor&quot;, &quot;calificacion&quot;, &quot;fecha&quot;, &quot;comentario&quot;],
                      description: &quot;Los datos de cada comentario&quot;,
                      properties: {
                          autor: {
                              bsonType: &quot;string&quot;,
                              description: &quot;Nombre del autor de la noticia&quot;
                          },
                          calificacion: {
                            bsonType: &quot;int&quot;,
                            description: &quot;La calificacion que dio el autor a la noticia&quot;
                          }, 
                          fecha: {
                              bsonType: &quot;date&quot;,
                              description: &quot;Fecha en la que se realizo el comentario&quot;
                          },
                          comentario: {
                              bsonType: &quot;string&quot;,
                              description: &quot;Cuerpo del comentario&quot;
                          },
                      }
                  }
              },
              tag: {
                  bsonType: [&quot;array&quot;],
                  uniqueItems: false,
                  items: {
                      bsonType: [&quot;string&quot;],
                      description: &quot;Los datos de cada comentario&quot;,
                  }
              }
          },
        }
     },
     validationAction: &quot;warn&quot;
  })
  </code></pre>
  <p>When I try to instert a new item in order to test the schema I get the error:</p>
  <p>&quot;key $date must not start with '$'&quot;</p>
  <p>This is the insert query:</p>
  <pre><code>db.noticias2.insert(
      {
      &quot;newsID&quot;: 3,
      &quot;nombre&quot;: &quot;Switches&quot;,
      &quot;autor&quot;: &quot;Jeannine Hammarberg&quot;,
      &quot;fecha&quot;: {
          &quot;$date&quot;: &quot;2019-05-06T15:32:57.000Z&quot;
      },
      &quot;cuerpo&quot;: &quot;Bushpig&quot;,
      &quot;comentarios&quot;: [
          {
              &quot;autor&quot;: &quot;Gabrila Featonby&quot;,
              &quot;calificacion&quot;: 1,
              &quot;fecha&quot;: {
                  &quot;$date&quot;: &quot;2020-05-18T20:44:07.000Z&quot;
              },
              &quot;comentario&quot;: &quot;Southern boubou&quot;
          },
          {
              &quot;autor&quot;: &quot;Janeta Lamonby&quot;,
              &quot;calificacion&quot;: 9,
              &quot;fecha&quot;: {
                  &quot;$date&quot;: &quot;2018-10-06T17:50:47.000Z&quot;
              },
              &quot;comentario&quot;: &quot;Squirrel, uinta ground&quot;
          },
          {
              &quot;autor&quot;: &quot;Allard Livard&quot;,
              &quot;calificacion&quot;: 7,
              &quot;fecha&quot;: {
                  &quot;$date&quot;: &quot;2020-05-19T19:27:56.000Z&quot;
              },
              &quot;comentario&quot;: &quot;Springbok&quot;
          }
      ],
      &quot;tag&quot;: [
          &quot;Gigazoom&quot;,
          &quot;Tanoodle&quot;,
          &quot;Kaymbo&quot;
      ]
  }
  )
  
  mongo --version:
  
  </code></pre>
  <p>mongo --version:</p>
  <pre><code>MongoDB shell version v4.4.2
  Build Info: {
      &quot;version&quot;: &quot;4.4.2&quot;,
      &quot;gitVersion&quot;: &quot;15e73dc5738d2278b688f8929aee605fe4279b0e&quot;,
      &quot;modules&quot;: [],
      &quot;allocator&quot;: &quot;tcmalloc&quot;,
      &quot;environment&quot;: {
          &quot;distmod&quot;: &quot;windows&quot;,
          &quot;distarch&quot;: &quot;x86_64&quot;,
          &quot;target_arch&quot;: &quot;x86_64&quot;
      }
  }
  
  </code></pre>
  <p>P.D: Any feedback in the validation schema would be appreciated and sorry about it being in spanish my profesor force me to it</p>