Retrieving data stored in current row as a hash

$table.fields-data stored in the current table row, returned as hash (for nameless tables available since [3.4.0]).

Returns data stored in the current table row as a hash. The names of the columns then become hash keys, while columns' data-respective values.

It is necessary to use this method if columns' names coincide with names of methods or constructors of class
table. In this case you cannot retrieve their values directly-Parser will report an error. If it is necessary to work with fields with such names, it is safe to use field fields and work with not table but hash.

$tab[^table::create{menu   line
yes   first
no   second}

As a result, you will get values of fields
menu and line (such names will coincide with methods of class table) as keys of hash tab_hash.

Copyright © 1997–2021 Art. Lebedev Studio | Last updated: 14.08.2010