How to filter a table using a Reference Field Type value?

Hi! I want to filter my table based on the current user. My code is below:

.then((email) => {
let userEmail = email;
.eq("email", userEmail)

This code is inside a .onready function. name is the field key of the reference field type.
When I test it using other fields and values such as ("firstName, “Gerald”), it worked since firstName is not a reference type, just a text field type. How do I get the value of the reference type? Thanks!

Nevermind. I got it to work. Since the REFERENCE Field Type gets the _id instead of the name regardless of the field, I used the currentUser ID instead. Thanks! :smiley: