select. Selecting entries


The method looks through the table row by row, examining each row in respect to the specified
criterion (a mathematical expression). The rows which satisfy the criterion (returned Boolean value is "true") are collected into the table with the same structure as that of the original table.

Options hash can be specified:

$.offset(number of rows)
Skip specified number of rows which satisfy the criterion before copying the fist row.
Maximum number of rows to be selected
true=process rows in the reverse order

$men[^table::create{name   age
Stephen   26
Alex   20
Michael   29
Denis   30
age > 20)[ $.limit(2) ]]

$thoseAbove20 will contain table made up of rows with Stephen and Michael.

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