title: Object type in mongoose
body: <p>I am defining a mongoose schema and definition is as follows:</p>
  
  <pre><code>   inventoryDetails: {
          type: Object,
          required: true
  
      },
      isActive:{
          type:Boolean,
          default:false
      }
  </code></pre>
  
  <p>I  tried "Object" type and I am seeing my data is getting saved successfully. When I changed type to array, the save is failing. </p>
  
  <p><strong>Sample Data:</strong></p>
  
  <pre><code>{
      "inventoryDetails" : { 
          "config" : { 
              "count" : { 
                  "static" : { "value" : "123" }, 
                  "dataSource" : "STATIC" 
              }, 
              "title" : { 
                  "static" : { "value" : "tik" }, 
                  "dataSource" : "STATIC" 
              } 
          }, 
          "type" : "s-card-with-title-count" 
      } 
  }
  </code></pre>
  
  <p>"Object" type is not one of the types that mongoose allows. But, how it is being supported ? </p>