Francis Smith
Francis Smith

Reputation: 23

How to view document UUID in RethinkDB

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?

Upvotes: 1

Views: 46

Answers (1)

taygetos
taygetos

Reputation: 3040

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")

Upvotes: 0

Related Questions