print("STEP 1 - INSERT SONGS");
db.songs.insertMany([
{
song: "Babalik Ka Pa Ba",
artist: "CHNDRT",
album: "Habang Umuulan",
released: 2018
},
{
song: "Bulong",
artist: "December Avenue",
album: "Langit Mong Bughaw",
released: 2019
},
{
song: "Bawat Kaluluwa",
artist: "IV of Spades",
album: "CLAPCLAPCLAP",
released: 2019
},
{
song: "Kathang Isip",
artist: "Ben&Ben",
album: "Ben&Ben",
released: 2017
}
]);
print("STEP 2 - FIND SONGS FROM 2017 AND 2018");
db.songs.find({
released: { $in: [2017, 2018] }
}).forEach(printjson);
print("STEP 3 - DELETE BAWAT KALULUWA");
printjson(db.songs.deleteOne({
song: "Bawat Kaluluwa"
}));
print("STEP 4 - FIND BULONG");
db.songs.find({
song: "Bulong"
}).forEach(printjson);
To embed this project on your website, copy the following code and paste it into your website's HTML: