Function head()
returns the first element of the array, namely, the element with index [0]
.
Arguments:
- Array <array>
Returns:
- First element <string>
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))