**Background:** I have an array of objects sent from Vue Axios. These objects are key value pairs which is stored in the req.body.

**Req.body**

```
keyValue:  [{key:"some key", value:"some value"}, {key:"some key2", value:"some value2"}]

```

**Note**: I can expect to receive a req.body with a numerous amount objects withing the array. I can not access the "key" and "value" in the objects without adding a [ ] or req.body.keyValue[0]. 

How can I dynamically add each object's "key" and "value" into mongoose without having to explicitly call a specific object?

**I am trying to do something like this:**(failed attempt)

```
const mongoose = require("mongoose");
const Schema = mongoose.Schema;

const Schema = new Schema({
  Pair: [{
    Key: String,
    Value: Number
  }]
});

router.post("/",  (req, res) => {
 User.update({},
  {$push:
  {Pair:{
        Key: req.body.keyValue.key,
         Value: req.body.keyValue.value
       }
      }
    }, 
  (err,result)=>{
    if(err){
      console.log(err);
      res.status(400).send('Error')
    }else{
      res.status(200).send(result);
    }
  })
}

```

I hope I was able to explain well enough. Let me know if there is any confusions. Thanks!