Table.prototype.where

Returns a new table containing only the rows for which the specified function returns true.

Syntax

where(column, fn)

Parameters

Example

new Table(["Item", "Count"], [
  ["Bicycle", 5],
  ["Scooter", 2]
]).where("Count", v => v > 2)
ItemCount
Bicycle5