title: Req.body not fetching array value from schema when save data using node
body: <p><em>When I'm saving the data using node in my MongoDB schema array would be empty here my code and output could you please explain why this error happening</em></p>
  <h3>controller.js</h3>
  <pre><code>  const {name,age,social,songs}=new musicModel(req.body)
    
    const addMusic =await musicModel.create({
     name,age,songs,social
    })
  
    if (addMusic) {
      res.send(addMusic)
    } else {
      res.status(500).send(&quot;unsuccessfull.&quot;)
    }
  }
  </code></pre>
  <p>Here's my schema but it will perfectly work when I send response using postmen but when I saved this the bellow array was undefined or null</p>
  <h3>model.js</h3>
  <pre><code>const mongoose = require(&quot;mongoose&quot;)
  const songSchema= mongoose.Schema({
    title:{
      type:String
    },
    sales:{
      type:String
    }
  })
  const musicSchema = mongoose.Schema({
    name: {
      type: String
    },
    age: {
      type: String
    },
    social: {
      show: {
        type: Number
      }, tours: {
        type: Number
      },
    },songs:[songSchema]
  })
  const musicModel =mongoose.model(&quot;Music&quot;,musicSchema)
  module.exports= musicModel
  </code></pre>
  <h3>app.js</h3>
  <pre><code>const express = require('express')
  const logger = require('morgan')
  const bodyParser = require('body-parser')
  const mongoose = require('mongoose')
  require(&quot;dotenv/config&quot;)
  
  const cors = require('./middleware/cors')
  
  const productsRouter = require('./routes/products')
  const customerRouter= require('./routes/customers')
  const quotRouter=require('./routes/quots')
  const usersRouter = require('./routes/users')
  
  mongoose.connect(
    process.env.CONNECTION_URL,
    { useNewUrlParser: true },
    (err) =&gt; {
      if (!err) {
        console.log('DB Connected')
      }
    }
  );
  
  const app = express()
  app.use(express.static('public'))
  
  app.use(logger('dev'))
  
  
  app.use(bodyParser.json())
  app.use(bodyParser.urlencoded({ extended:true}))
  app.use(cors)
  
  app.use('/products', productsRouter)
  app.use('/customer',customerRouter)
  app.use('/', usersRouter)
  app.use('/quotation',quotRouter)
  
  module.exports =app;
  
  </code></pre>
  <h3>output</h3>
  <pre><code>{
      &quot;name&quot;: &quot;ashit&quot;,
      &quot;age&quot;: &quot;67&quot;,
      &quot;social&quot;: {
          &quot;show&quot;: 566,
          &quot;tours&quot;: 47
      },
      &quot;songs&quot;: [],
      &quot;_id&quot;: &quot;61c57a22a6903d467834d19f&quot;,
      &quot;__v&quot;: 0
  }
  </code></pre>