First
The first member of a set or a list, or null when there is none. For a cloud set the first in its order (so most useful with ordered), read on the server; for a list its first item, where it is. Capitalized.
Runs on: either side: the compiler places the statement that calls it where the values it uses live.
Format:
First(set_or_list)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| set_or_list | mixed | the cloud set, or the list |
Returned Value:
| Type | Description |
|---|---|
| mixed | the first member, or null |
Examples
newest = First(ordered(posts, "created_at", "descending"))