Course lesson
Selecting multiple fields in an FQL query
You can use array and object literals to compose multiple selections into a single query, such as within a lambda.
- Duration
- 1 min
- Access
- Free
- Transcript
- Available
You can use array and object literals to compose multiple selections into a single query, such as within a lambda.
Map(
Paginate(Match(Index("all_customers"))),
Lambda(
"X",
Select(["data", "firstName"], Get(Var("X")))
)
)with arrays
Map(
Paginate(Match(Index("all_customers"))),
Lambda(
"X",
[
Select(["data", "firstName"], Get(Var("X"))),
Select(["data", "lastName"], Get(Var("X")))
]
)
)with objects
Map(
Paginate(Match(Index("all_customers"))),
Lambda(
"X",
[
Select(["data", "firstName"], Get(Var("X"))),
Select(["data", "lastName"], Get(Var("X")))
]
)
)Map( Paginate(Match(Index("all_customers"))), Lambda( "X", { firstName: Select(["data", "firstName"], Get(Var("X"))), lastName: Select(["data", "lastName"], Get(Var("X"))) } ) )