Able to output one object based on the filter below, but in MongoDB there are 500 objects, so how do I output all the objects inside the collection of the MongoDB? Already tried find(). But then I got something like this.
The objects in MongoDB looks like this:
const client = new MongoClient(uri, {
useNewUrlParser: true,
useUnifiedTopology: true,
});
async function run() {
try {
await client.connect();
const database = client.db('database');
const music = database.collection('music');
const single = await music.find();
console.log(single);
} finally {
await client.close();
}
}

