Accessing fields through Refs with Select

Chris Biscardi
InstructorChris Biscardi

Share this video with your friends

Send Tweet
Published 3 years ago
Updated a year ago

Refs are opaque. To access the fields on a document associated with a Ref, we first need to run Get on our results and then we can access fields using Select

Map(
  Paginate(Match(Index("all_customers"))),
  Lambda("X", Get(Var("X")))
)
Map(
  Paginate(Match(Index("all_customers"))),
  Lambda("X", Select(["data", "firstName"], Get(Var("X"))))
)