Tables and the Nested Data Structure
Overview
In Kintone, an App corresponds to a database table, and a record is a single row within it.
A Table is a field type that can be added to a record. It embeds a nested table (subtable) of rows within that single record.
The nested structure of the record makes the JSON complex during JavaScript customization. This article explains the data structure of tables in JavaScript.
Structure of Tables
Sample Table
This section uses a sample App to explain the structure. The sample Table is set up as follows.
| Field Type | Field Name | Field Code | Notes |
|---|---|---|---|
| Table | Travel Expenses | Table | - |
| Date | Date | expense_date | - |
| Radio button | Means | expense_means | Choices: Train, Plane, Hotel |
| Number | Cost | expense_cost | Unit of measure: $ (Prefix) |
Check the Table Structure in Kintone
This section provides a clearer view of the table structure. Follow the steps below to verify that structure using code.
-
Navigate to the record details page and open the browser's developer tools.
-
Open the Console tab and run the following code.
1 2 3kintone.events.on('app.record.edit.show', (event) => { console.log(event); }); -
Click Edit record.
-
The
app.record.edit.showevent runs, and the event object appears in the console.
For more information on accessing record data with event objects, refer to the following article:
Access Record Data with Event Objects
Diagram of the Table Structure
The following diagram shows how a Kintone Table field is represented within a record.
The left side is the JavaScript structure when the sample record is retrieved. The right side shows how it is displayed in the App.
Table: A Table field is not a flat array of values. It is an object with nestedvaluelayers.value: Array(3): An array of rows.Array(3)means the Table has 3 rows. The indices (0,1,2) are array positions in display order.id: "9620": A row ID. This is a unique string that Kintone assigns to each existing row. It is neither the row number nor the array index. Row ID is often used when managing Tables with the REST API.{type: 'NUMBER', value: '30.55'}:typeis the field type.valueis the field value.- The following paths show the structure to each field value in the first row:
record.Table.value[0].value.expense_cost.value//"30.55"record.Table.value[0].value.expense_date.value//"2026-07-01"record.Table.value[0].value.expense_means.value//"Train"
The table is represented as follows in JSON:
|
|
How to Manage Tables
There are three ways to add, update, or delete table rows.
- Using
kintone.app.record.get()andkintone.app.record.set()
kintone.app.record.get()retrieves the data of the current record.
kintone.app.record.set()sets values on the record that is currently being edited. - Using event object
When a Kintone event is triggered, modify the object and return it to apply the changes.
For more information, refer to the following article:
Event Object Actions - Using REST API
Update the table data with REST API.
Notes
- In the array, the first row is index
0, the second row is index1, and so on. - Each row has a row ID that Kintone assigns automatically. This ID identifies the row when updating a table through the REST API.
- The structure of
valuedepends on the field type, and is either a string or an array. Number field values are handled as strings.
For more information on field types, refer to the following article: