Sets or gets the table's row data.
Setting the rows property sets the data of the table's rows. A table's data is stored as an array of objects where each object represents a row in the table.
The objects are composed of "key":"value" pairs where:
For example, a simple array of table data may look like this:
[ { "firstName": "John", "lastName": "Doe", "email": "john.doe@somedomain.com", "image": "http://someImageUrl/john.jpg" }, { "firstName": "Jane", "lastName": "Doe", "email": "jane.doe@somedomain.com", "image": "http://someImageUrl/jane.jpg" } ]If the rows array contains objects with values whose keys are not table columns, those values do not appear in the table. For example, assuming the rows array shown above, if the table does not have an email column, the email values do not appear in the table.
Set rows to an empty array ([]) to remove the current rows.
Getting the rows property returns the current list of the table's row data. If the table is connected to a dataset, rows does not include the fields from the dataset items that are not connected to table columns.
To update an individual table row, use the updateRow() function.
To add or remove individual table rows:
To set a table's row data based on a query you perform using the wix-data API:
Note that you can optionally add to, remove from, or modify the data returned from the query before using it to set the table's row data.