This lesson has been retired.
1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

    Accessing fields through Refs with Select

    Chris BiscardiChris Biscardi
    faunadbFaunaDB

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

    Code

    Become a Member to view code

    You must be a Member to view code

    Access all courses and lessons, track your progress, gain confidence and expertise.

    Become a Member
    and unlock code for this lesson
    Discuss

    Discuss