The [pair->first] method returns the first element of a pair.
The pair data type is usually used within an array to store a sequence of name/value pairs. The [map->get] method also returns elements of type pair.
pair->first
Use the [pair->first] method. The following example iterates through an array of pairs and returns the first element from each.
Code
var( someGuy = array( 'First Name' = 'John', 'Last_Name' = 'Doe', 'Sex' = 'Male', 'Height' = '188cm') )
with p in $someGuy
do => {^
#p->first+'\n'
^}
Result
First Name Last_Name Sex Height
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft
Recent Comments