Array.bykey()
Jump to navigation
Jump to search
bykey
Create an object with elements of array bucketed with the key specified.
Example
a=#TABLE1;
a.bykey(0)
{ "Amino Acid": [ [ "Amino Acid", "Symbol", "SLC", "DNA codons" ] ], "Isoleucine ": [ [ "Isoleucine ", "Ile", "I", "ATT, ATC, ATA" ] ],
etc a=MS(4); a=a.concat(8,3,4,5); a.bykey(1);
{"3": [ [ 13, 3, 2, 16 ], [ 8, 3, 4, 5 ] ], "6": [ [ 12, 6, 7, 9 ] ], "10": [ [ 8, 10, 11, 5 ] ], "15": [ [ 1, 15, 14, 4 ] ] }