RecordStore
The object that contains JSON data for a data table.
Declaration
object RecordStoreProperties
| Name | Type | Description |
|---|---|---|
descriptors Required | [DataDescriptor] | Provides information about the data that can be in each data record. The order of the descriptors determines the order of the columns (or the rows if the table’s Version 1.5 |
records Required | [RecordStore.records] | Provides data records that fit within the structure defined by You can choose not to include all values from a given record in a data table. Only data that corresponds to a data descriptor will be included in your data table. |
Mentioned in
Discussion
The RecordStore object uses two required properties to provide the data for a table and to specify how that data will be used in the table.
Data
descriptorsdefine how the data is interpreted and how it will be displayed in the table. For each set of data, data descriptors communicate the data type, unique keys, data formats, and header labels for the table.Data
recordsprovide the actual data as a set of key-value pairs that relate to the descriptors.
For example, your data descriptors might describe a table that contains stock symbols and prices; each data record could provide the symbol and price for a particular stock.
This object can be used in DataTable.
Example
{
"components": [
{
"role": "datatable",
"showDescriptorLabels": true,
"sortBy": [
{
"descriptor": "id-name",
"direction": "descending"
}
],
"data": {
"descriptors": [
{
"identifier": "id-name",
"key": "name",
"label": {
"type": "formatted_text",
"text": "Name"
},
"dataType": "string"
},
{
"identifier": "id-occupation",
"key": "occupation",
"label": "Occupation",
"dataType": "string"
}
],
"records": [
{
"name": "Amelia Earhart",
"occupation": "Pilot"
},
{
"name": "Grace Hopper",
"occupation": "Computer Scientist"
}
]
}
}
]
}