mongodb - Why is Robomongo returning an object from db.collection.distinct() instead of an array? -


using example mongodb reference, i'd expect db.inventory.distinct("dept"); return array ["a", "b"], , that's happens when run shell. using robomongo (on os x) instead object name-value pairs, so: { "0" :"a", "1": "b" }.

this setup:

db.inventory.drop(); db.inventory.insert([     { "_id": 1, "dept": "a", "item": { "sku": "111", "color": "red" },     { "_id": 2, "dept": "a", "item": { "sku": "111", "color": "blue" },     { "_id": 3, "dept": "b", "item": { "sku": "222", "color": "blue" },     { "_id": 4, "dept": "a", "item": { "sku": "333", "color": "black" }  ]); 

why robomongo behaving different? can it?


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -