layout | language | permalink | command | related_commands | ||
---|---|---|---|---|---|---|
api-command |
Java |
api/java/keys/ |
keys |
|
{% apibody %} singleSelection.keys() → array object.keys() → array {% endapibody %}
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" ]