--- title: "Construct NoSQL Item" url: https://docs.catalyst.zoho.com/en/sdk/javascript/v1/cloudscale/nosql/construct-item/ description: "This page describes the method to perform operations in the NoSQL component." last_updated: 2026-09-09T10:45:38Z service: CloudScale type: general related_links: - name: "Catalyst CloudScale" url: /en/cloud-scale/ - name: "NoSQL Help Documentation" url: /en/cloud-scale/help/nosql/introduction/ - name: "Java SDK Documentation" url: /en/sdk/java/v1/cloud-scale/nosql/construct-item/ - name: "Python SDK Documentation" url: /en/sdk/python/v1/cloud-scale/nosql/construct-item/ - name: "REST API Documentation" url: /en/api/code-reference/cloud-scale/nosql/insert-item/#InsertNewItem repository: name: "Repository" url: https://github.com/catalystbyzoho/zcatalyst-sdk-js --- # Construct NoSQL Item > **Note:** Ensure you have installed the [required package](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/cloudscale/nosql/overview/#prerequisites) to use this SDK method. Catalyst NoSQL items represent a collection of attributes that hold the data of a single data point, like records. You can insert or update items into an existing NoSQL table in your project in a [Custom JSON format](https://docs.catalyst.zoho.com/en/cloud-scale/help/nosql/working-with-data/introduction/#the-catalyst-custom-json-format). However, before you insert or update an item in Catalyst, you will need to construct the item. You can construct a NoSQL item of attributes containing different data types supported by Catalyst as described in the following sections. Catalyst supports several data types such as **String**, **Number**, **Set of Strings**, **Set of Numbers**, **List**, and **Map**. You must provide the values for the partition key attribute that you configured for a table in every data item. > **Notes:** * [Learn more on supported data types](https://docs.catalyst.zoho.com/en/cloud-scale/help/nosql/working-with-data/introduction/#supported-data-types). * [Learn more table keys and other table attributes](https://docs.catalyst.zoho.com/en/cloud-scale/help/nosql/components/#table-keys). ### Create a New NoSQL Item You can create a new NoSQL item using the `NoSQLItem()` SDK method. ```javascript const item = new NoSQLItem(); // Create a new NoSQL item ``` ### Construct a NoSQL Item of String In the following example code snippet, we construct an item that includes string values and a nested JSON attribute `color` as a Map. ```javascript const item = new NoSQLItem() // Create a new NoSQL item // Add a string value .addString('fruit', 'mango') // Add a map .addMap('properties', { color: 'yellow' }); ``` ### Construct a NoSQL Byte You can create a NoSQL byte to store values of the Binary data type, by creating a buffer object that is used to represent a sequence of bytes. You can then create a byte in two ways: * Using the `ArrayBuffers` object that represents a raw binary data buffer. * Using a `Base64` string that represents binary data in the ASCII format. #### Example Code Snippet ```javascript const buff = Buffer.from('Hello world !!!'); // Create a buffer object const byte = new NoSQLByte(buff); // Create a NoSQL byte using the ArrayBuffers object const byteA = new NoSQLByte(buff.toString('base64')); // Create a NoSQL byte from a Base64 string ``` ### Construct a NoSQL Byte Set Catalyst enables you to create a NoSQL byte set to store a collection of binary values of the Set of Binary data type, by creating a buffer object that is used to represent a sequence of bytes. You can then create a byte set using: * The `ArrayBuffers` object that represents a raw binary data buffer * A `Base64` string that represents binary data in the ASCII format. Additionally, you can also create a byte set from passing constructed bytes as a byte array. #### Example Code Snippet ```javascript const buff = Buffer.from('Hello world !!!'); // Create a buffer object const byte = new NoSQLByte(buff); // Create a NoSQL byte using the ArrayBuffers object const byteA = new NoSQLByte(buff.toString('base64')); // Create a NoSQL byte from a Base64 string const byteSet = new NoSQLByteSet([byte, byteA]); // Create a NoSQL byte set from a NoSQL byte array const byteSetA = new NoSQLByteSet([buff.toString('base64')]); // Create a NoSQL Byte set from a Base64 string array const byteSetB = new NoSQLByteSet([buff]); // Create a NoSQL Byte set using the ArrayBuffers object ``` ### Construct a NoSQL String Set You can create a NoSQL string set of the *Set of String* data type from a string array. #### Example Code Snippet ```javascript const stringSet = new NoSQLStringSet(['hello', 'world']); // Create a NoSQL string set from a string array ``` ### Construct a NoSQL Number Set You can create NoSQL number set of the *Set of Numbers* data type from an array of numbers or **BigInt** values. #### Example Code Snippet ```javascript const numberSet = new NoSQLNumberSet([123, 1234n]); // Create a NoSQL Number set from an array of numbers or BigInt values ```