Trying to play around with the NoSQL explorer, but there seems to be no documentation for it anywhere and I can't seem to put anything in any of the fields that doesn't result in an error... Is there anywhere that gives any kind of guidance for this?
As an example case, how would I query all users and just get their userName? I can get all users by entering nothing at all, but if I put username, "userName", {userName}, {"userName"} or pretty much any other conceivable entry in the "Fields" space, I get an error
Best Answer
J
Jeff Amiel
said
almost 6 years ago
In the 'fields' textbox of the NoSQL explorer, try this
{_id: -0, userName: 1}
That essentially means to NOT include the usually always included _id field and to only show the userName field in the results.
Matthew Holtzem
Trying to play around with the NoSQL explorer, but there seems to be no documentation for it anywhere and I can't seem to put anything in any of the fields that doesn't result in an error... Is there anywhere that gives any kind of guidance for this?
As an example case, how would I query all users and just get their userName? I can get all users by entering nothing at all, but if I put username, "userName", {userName}, {"userName"} or pretty much any other conceivable entry in the "Fields" space, I get an error
In the 'fields' textbox of the NoSQL explorer, try this
That essentially means to NOT include the usually always included _id field and to only show the userName field in the results.
You can find more examples and such here: https://docs.mongodb.com/manual/reference/method/db.collection.find/
- Oldest First
- Popular
- Newest First
Sorted by Newest FirstMatthew Holtzem
Thanks for the examples and the docs link! I'll be sure to check them out :)
Baris Tumerkan
Putting { "userName": 1 } in the Fields space should work.
In general, what you enter in the NoSQL tabs translate to MongoDB commands. The documents here are quite nice once you get used to them: https://docs.mongodb.com/manual/reference/method/db.collection.find/
( I think the version of MongoDB used currently 3.0, though basic operations are mostly the same in all versions. )
Jeff Amiel
In the 'fields' textbox of the NoSQL explorer, try this
That essentially means to NOT include the usually always included _id field and to only show the userName field in the results.
You can find more examples and such here: https://docs.mongodb.com/manual/reference/method/db.collection.find/
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics