I have a collection in MongoDB named (Emotion), it has 13 documents and one of the attributes of the document is (maxEmotion)
I'm using Python, I want to return all the values of that attribute, so at the end I will have 13 results.
I've tried:
emotions = db.Emotion.distinct("maxEmotion")
But I didn't get the correct results.
This is a picture from the collection:
Thank you.