I\'m trying to learn MongoDB and how it\'d be useful for analytics for me. I\'m simply playing around with the JavaScript console available on their website and have created
The code that fails on their website works on an actual MongoDB instance:
> db.posts.insert({title: "Hello", tags: ["one", "five"]}); > db.posts.insert({title: "World", tags: ["one", "three"]}); > db.posts.distinct("tags"); [ "one", "three", "five"]
Weird.