title: set default values to mongoose arrays in node js
body: <p>In my model definition, I have:</p>
  
  <pre><code>appFeatures: [{
          name: String,
          param : [{
              name : String,
              value : String
          }]
      }]
  </code></pre>
  
  <p>I want to set default value to appFeatures, for example:
  name: 'feature',
  param: [{name:'param1',value:'1'},{name:'param2',value:'2'}]</p>
  
  <p>I tried to do it by </p>
  
  <pre><code>appFeatures : { type : Array , "default" : ... }
  </code></pre>
  
  <p>But its not working, any ideas? </p>
  
  <p>Thanks</p>