Array.bykey()

Revision as of 03:45, 15 April 2020 by Devika (talk | contribs) (→‎Example)

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 ] ] }

See Also