create()
You can create a data by Schema
User.create({
name: "John Doe",
age:18,
hair: {
color: "blue",
size:"short"
}
},(err, data) => {
if(err) {
console.log(err.message)
} else {
console.log(data)
}
});
Last updated
Was this helpful?