--- title: "Insert Rows" url: https://docs.catalyst.zoho.com/en/sdk/javascript/v1/cloudscale/datastore/insert-rows/ description: "This page describes the method to perform operations in the DataStore component." last_updated: 2026-09-09T10:45:38Z service: CloudScale type: general related_links: - name: "Catalyst CloudScale" url: /en/cloud-scale/ - name: "DataStore Help" url: /en/cloud-scale/help/data-store/introduction/ - name: "Java SDK" url: /en/sdk/java/v1/cloud-scale/data-store/insert-rows/ - name: "Python SDK" url: /en/sdk/python/v1/cloud-scale/data-store/insert-rows/ - name: "iOS SDK" url: /en/sdk/ios/v2/cloud-scale/data-store/create-rows/ - name: "Android SDK" url: /en/sdk/android/v2/cloud-scale/data-store/create-rows/ - name: "Flutter SDK" url: /en/sdk/flutter/v2/cloud-scale/data-store/create-rows/ - name: "REST APIs" url: /en/api/code-reference/cloud-scale/data-store/insert-new-row/#InsertNewRow repository: name: "Repository" url: https://github.com/catalystbyzoho/zcatalyst-sdk-js --- # Insert Rows > **Notes:** * Ensure you have installed the [required package](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/cloudscale/datastore/overview/#prerequisites) to use this SDK method. * Ensure that you create the required [table](https://docs.catalyst.zoho.com/en/cloud-scale/help/data-store/tables/#create-a-new-table) and [columns](https://docs.catalyst.zoho.com/en/cloud-scale/help/data-store/columns/#create-a-new-column) in the console. ### Insert a Single Row You can use the `insertRow()` SDK method, to insert a single row of data to a column in a table in Catalyst DataStore. You can refer to the required table using its ID or name. The `table` reference used in the below code snippets can either be a [table instance](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/cloudscale/datastore/get-table-instance/) or a [table meta](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/cloudscale/datastore/get-table-metadata/). To use the following SDK method, you need to create a JSON object containing the row details in the following format: ```text {column name : column value} ``` This JSON object will then need to be passed as an argument to the `insertRow()` SDK method. ```javascript // Create a JSON object with the rows to be inserted const rowData = { Name: "George Hamilton", Age: 22, ID: 6868 }; // Use the table meta object to insert the row const datastore = new Datastore(); const table = datastore.table("EmpDetails"); const row = await table.insertRow(rowData); console.log(row); ``` A unique [`RowID`](https://docs.catalyst.zoho.com/en/cloud-scale/help/data-store/records/#create-a-new-record) value will be automatically generated once the row is inserted. #### Example of Expected Response ```json { "CREATORID": "2136000000006003", "MODIFIEDTIME": "2021-08-16 16:29:10:499", "Name": "George Hamilton", "Age": "22", "ID": "6868", "CREATEDTIME": "2021-08-16 16:29:10:499", "ROWID": 2136000000011011 } ``` ### Insert Multiple Rows You can insert multiple rows to a table in Catalyst DataStore by constructing an array that contains the row data and passing it as an argument to the `insertRows()` SDK method. You can refer to the required table using its ID or name. The `table` reference used in the below code snippets can either be a [table instance](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/cloudscale/datastore/get-table-instance/) or a [table meta](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/cloudscale/datastore/get-table-metadata/). ```javascript // Create a JSON array with the rows to be inserted const rowData = [ { Name: "Mark Wellington", Age: 29, ID: 7218 }, { Name: "Zendaya Jones", Age: 32, ID: 3211 } ]; // Use the table meta object to insert multiple rows const datastore = new Datastore(); const table = datastore.table("EmpDetails"); const rows = await table.insertRows(rowData); console.log(rows); ``` #### Example of Expected Response The promise returned when using the `insertRows()` SDK method is resolved to an array containing the row objects. ```json [ { "CREATORID": "2136000000006003", "MODIFIEDTIME": "2021-08-25 13:55:04:904", "Name": "Mark Wellington", "Age": "92", "ID": "7218", "CREATEDTIME": "2021-08-25 13:55:04:904", "ROWID": 2136000000038008 }, { "CREATORID": "2136000000006003", "MODIFIEDTIME": "2021-08-25 13:55:04:906", "Name": "Zendaya Jones", "Age": "32", "ID": "3211", "CREATEDTIME": "2021-08-25 13:55:04:906", "ROWID": 2136000000038010 } ] ```