The [pair->values] method converts a pair into a staticarray object with the "name" of the pair in position 1 and the "value" of the pair in position 2.
pair->values
This example iterates through and array of pairs and uses the [pair->values] method to convert each pair into an array which is merged into a new array
Code
var( someGuy = array( 'First Name' = 'John', 'Last_Name' = 'Doe', 'Sex' = 'Male', 'Height' = '188cm'),
newArray = array )
with p in $someGuy
do => {^
$newArray->merge(#p->values)
^}
$newArray
Result
array(First Name, John, Last_Name, Doe, Sex, Male, Height, 188cm)
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