--- title: "Get Rows" url: https://docs.catalyst.zoho.com/en/sdk/javascript/v1/cloudscale/datastore/get-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/get-rows/ - name: "Python SDK" url: /en/sdk/python/v1/cloud-scale/data-store/get-rows/ - name: "iOS SDK" url: /en/sdk/ios/v2/cloud-scale/data-store/get-rows/ - name: "Android SDK" url: /en/sdk/android/v2/cloud-scale/data-store/get-rows/ - name: "Flutter SDK" url: /en/sdk/flutter/v2/cloud-scale/data-store/get-rows/ - name: "REST APIs" url: /en/api/code-reference/cloud-scale/data-store/get-all-rows/#GetAllRows repository: name: "Repository" url: https://github.com/catalystbyzoho/zcatalyst-sdk-js --- # Get Rows > **Note:** 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. ### Get a Single Row You can use the `getRow()` SDK method to fetch a single row from a table in the Catalyst Data Store. 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 const datastore = new Datastore(); const table = datastore.table('ShipmentDetails'); //Use the table instance or the table meta object to fetch a row by passing the Row ID const rowPromise = table.getRow(1510000000109476); ``` ### Example of Expected Response ```json { "CREATORID": "2136000000006003", "MODIFIEDTIME": "2021-08-17 13:02:11:184", "CREATEDTIME": "2021-08-16 16:29:10:499", "CityName": "Chennai", "ROWID": "2136000000011011" } ``` ### Get All Rows Through Pagination You can use the get the required rows of data from a table in the Data Store in a paginated fashion using the `getMyPagedRows()` SDK method. You can refer to the required table [using its ID](https://docs.catalyst.zoho.com/en/cloud-scale/help/data-store/tables/#create-a-new-table). 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/). > **Info:** Getting the rows in a paginated manner allows you to fetch the rows of a table in batches or pages through iteration. #### Parameters Used
Parameter Name Data Type Definition
`hasNext` **Added** Will determine if the next iteration is required to fetch more rows.
`maxRows` **Int** An **optional** parameter. Will return the required number of rows per page based on the value you set. For example, if you set the value of `maxRows` as **100**, then **100 rows** of data will be per page.

> **Info:** By default, without using the `maxRows` parameter, the SDK method will return **200 rows** per page.
`nextToken` **String** Will be used to decide if more rows need to be fetched from the table.
`more_records` **Needed** Will be fetched from the response data to fetch the next set of records.
```javascript const datastore = new Datastore(); // Fetch rows through pagination and declare the value for nextToken as undefined for the first iteration async function getMyPagedRows(hasNext = true, nextToken = undefined) { if (!hasNext) { return; } const { data, next_token, more_records } = await dataStore.table(195000000042025).getPagedRows({ nextToken, maxRows: 100 }); console.log("rows:", data); // Fetch the rows from the table return getMyPagedRows(more_records, next_token); // Fetch next set of records } ``` #### Example of Expected Response **more_records set to true** The following type of response can be expected is the value for `more_records` is set as **true**. ```json { "status": 200, "data": [ { "CREATORID": "3359000000006003", "MODIFIEDTIME": "2022-01-11 18:18:24:855", "name": "Alex Jones", "CREATEDTIME": "2022-01-11 18:18:24:855", "ROWID": "3359000000108111" }, { "CREATORID": "3359000000006003", "MODIFIEDTIME": "2022-01-11 18:18:25:117", "name": "Robert Neal", "CREATEDTIME": "2022-01-11 18:18:25:117", "ROWID": "3359000000108114" }, { "CREATORID": "3359000000006003", "MODIFIEDTIME": "2022-01-11 18:18:25:120", "name": "Roslyn Gunn", "CREATEDTIME": "2022-01-11 18:18:25:120", "ROWID": "3359000000108117" } ], "message": "OK", "more_records": true, "next_token": "{{token}}" } ``` **more_records set to false** The following type of response can be expected is the value for `more_records` is set as **false**. ```json { "status": 200, "data": [ { "CREATORID": "3359000000006003", "MODIFIEDTIME": "2022-01-11 18:18:43:556", "name": "Alex Jones", "CREATEDTIME": "2022-01-11 18:18:43:556", "ROWID": "3359000000108410" }, { "CREATORID": "3359000000006003", "MODIFIEDTIME": "2022-01-11 18:18:43:557", "name": "Robert Neal", "CREATEDTIME": "2022-01-11 18:18:43:557", "ROWID": "3359000000108413" }, { "CREATORID": "3359000000006003", "MODIFIEDTIME": "2022-01-11 18:18:43:568", "name": "Roslyn Gunn", "CREATEDTIME": "2022-01-11 18:18:43:568", "ROWID": "3359000000108417" } ], "message": "OK", "more_records": false } ```