how to split a list in two directions?
alex at tweedly.net
Fri Oct 27 10:22:04 EDT 2017
Not a one-liner, but I'd be wiling to guess that
repeat for each line L in theData
put item 2 of L into A1[item 1 of L]
put item 1 of L into A2[item 2 of L]
will be as quick as any other method.
On 27/10/2017 14:05, Tiemo Hollmann TB via use-livecode wrote:
> I have a delimiter separated list of two columns, first column is an ID,
> second column a name.
> I need two arrays of this list, one with the first column (ID) as the key
> and one with the second column (name) as the key.
> With split myArray by CR and ";" I get the first column (the ID) as the key.
> Which is the most straight forward approach to get the second array with the
> name from the second column as the key? I am sure there is a one liner,
> without first shifting the columns of the list in a repeat loop.
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode