V4.1
Parameters, Value
Array Head function calculates the first element of the array, i.e. the element with index 0 <array>[0]
.
Syntax:
- Format: head(
<array>
) - Parameters: see table below
- Value: ATTR (string, number, time)
Name | Category | Specification | Description |
---|---|---|---|
array | ARRAY | / | Array to be calculated |
Common Usage
Example: Find a 3-step path from Card CA002 to CA005, and return the 1st edge of the path.
n({_id == "CA002"}).e()[3].n({_id == "CA005"}).limit(1) as p
return head(pedges(p))