Manipulate NoSQL ItemsAdmin Scope

Note: Ensure you have installed the required package to use this SDK method.

You can perform manipulations on a NoSQL items, such as creating a NoSQL item from a plain JavaScript object, or vice versa.

  • You can create a NoSQL item by constructing a plain JavaScript object that contains the item’s data in it, in the standard JSON format.
  • You can then construct the NoSQL item from the JS object using NoSQLItem.from().
  • You can also convert a NoSQL item back into a plain JavaScript object using itemFromObj.to().
copy
const obj = {
    fruit: 'apple', // Partition key
    properties: {
        color: 'red'
    }
};
const itemFromObj = NoSQLItem.from(obj); // Construct a NoSQL item from the plain JS object
const plainJsObject = itemFromObj.to(); // Convert the item to a plain JS object

Last Updated 2026-07-02 14:51:41 +0530 IST