Below is the structure of my MongoDB data:
{
"_id": "QEvgJKERy5xGNLv7J",
"title": "test 2",
"owner": "HQNGYZvrrdQRwLNvT",
"markdown": "sdfasdfdasf adsfadsfasdf",
"state": "Draft",
"category": [
"Bios & Memoirs",
"Classics"
],
"type": "Article",
"lastupdate": "",
"slug": "test-2",
"date": 1504890635515,
"views": "0",
"rating": "0",
"username": "gibigbig"
}
I am looking to retrieve all articles based on a specific category. For example:
db.documents.find({category: 'Comedy'});
However, this query is not working as expected. Any assistance on this matter would be highly appreciated.