keys
ReQL command: keys
Command syntax
singleSelection.keys() → array object.keys() → array
Description
Return an array containing all of an object’s keys. Note that the keys will be sorted as described in ReQL data types (for strings, lexicographically).
Example: Get all the keys from a table row.
// row: { "id": 1, "mail": "fred@example.com", "name": "fred" } r.table("users").get(1).keys().run(conn); // Result: [ "id", "mail", "name" ]
Related commands
Get more help
Couldn't find what you were looking for?
- Ask a question on Stack Overflow
- Chat with us and our community on Slack
- Talk to the team on IRC on #rethinkdb@freenode.net — via Webchat
- Ping @rethinkdb on Twitter
- Post an issue on the documentation issue tracker on GitHub
© RethinkDB contributors
Licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
https://rethinkdb.com/api/java/keys/