Tables and the Nested Data Structure

Contents

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.

  1. Navigate to the record details page and open the browser's developer tools.

  2. Open the Console tab and run the following code.

    1
    2
    3
    
    kintone.events.on('app.record.edit.show', (event) => {
      console.log(event);
    });
  3. Click Edit record.

  4. The app.record.edit.show event 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 nested value layers.
  • 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'}: type is the field type. value is 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:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{
  "Table": {
    "type": "SUBTABLE",
    "value": [
      {
        "id": "9620",
        "value": {
          "expense_cost": {
            "type": "NUMBER",
            "value": "30.55"
          },
          "expense_date": {
            "type": "DATE",
            "value": "2026-07-01"
          },
          "expense_means": {
            "type": "RADIO_BUTTON",
            "value": "Train"
          }
        }
      },
      {
        "id": "9621",
        "value": {
          "expense_cost": {
            "type": "NUMBER",
            "value": "120"
          },
          "expense_date": {
            "type": "DATE",
            "value": "2026-07-01"
          },
          "expense_means": {
            "type": "RADIO_BUTTON",
            "value": "Hotel"
          }
        }
      },
      {
        "id": "9622",
        "value": {
          "expense_cost": {
            "type": "NUMBER",
            "value": "30.55"
          },
          "expense_date": {
            "type": "DATE",
            "value": "2026-07-02"
          },
          "expense_means": {
            "type": "RADIO_BUTTON",
            "value": "Train"
          }
        }
      }
    ]
  }
}

How to Manage Tables

There are three ways to add, update, or delete table rows.

  • Using kintone.app.record.get() and kintone.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 index 1, 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 value depends 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:

Field Types