Create Many Records with model.create() help me

Create Many Records with model.create() help me
0

#1
var model = mongoose.model;
var createManyPeople = function(arrayOfPeople, done) {
    model.create(arrayOfPeople, (err, data) => {
      if(err) {
         done(err); 
      }
    done(null, data);
    }) 
};
``` why my code is not working please somebody help

#2

Please provide some additional information to allow others to help you.

For example:

  • What does it means ‘not working’?
    Does it gives you an error? Does it saves just one document? Does it execute smoothly but it does not save anything?

  • Is that all the code you have? Is there a repository somewhere?

  • Where the code runs?
    A local environment? A glitch stuff?


#3

A glitch stuff
this code not makin g any error but when I paste the URL in freecodecamp the challenge not pass


#4

Try:
model.create(arrayOfPeople, (err, arrayOfPeople) =>