wire.data.DataTable
Properties
A data table holds an array of objects in the Rows
property much like the rows in a relational database table. Each property in the object has a column that stores meta data about the property in the Columns
property.
Create a new data table by passing in an array of rows and an optional list of columns. If the columns aren't passed in, they will be created from the rows automatically.
Methods
Select Methods
Use the select
method in order to select data from the data table. The select
method can take an optional list of comma delimited fields to be selected.
Select Aggregate Methods
Select the UserName
column from the data table. Also select the FullName
field but change its name to DisplayName
. Aggregate the Quota
column using a sum
and format it to a whole number with no decimals which will include thousand separator commas. The result will automatically be grouped by UserName
and DisplayName
.
Filter Methods
Start a filter chain using the where
method.
Filter the data table to UserName
equal to apeters
but only if her Quota
is greater than 800
.
Evaluation Methods
Once fields are selected and filtered, use the following methods to evaluate the resulting rows.
The following creates a new data table with just the UserName
field from the original data table.
Visit Working with DataTables for more details and examples on using data tables.
Last updated