'No value when loging data from mongoose
I am trying to log the contents in my database but it is not returning anything in the console
const itemsSchema = { name: String};
const Item = mongoose.model("Item", {
itemsSchema
});
const item1 = new Item({
name: "Enter your text here"
});
const defaultArray = [item1];
Item.find((err, result) {
console.log(result);
});
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
