How to view document UUID in RethinkDB

46 views Asked by At

I can view all the documents in a table with this:

r.db('database').table('users')

But how can I list the uuid for each document/user?

1

There are 1 answers

0
taygetos On

If you want to list only the ids, you can use the map function:

r.db('database').table('users').map(r.row("id"))

other option would be the to use pluck (this will include the field name in the return object):

r.db('database').table('users').pluck("id")